Syntax: kill file$
Type: statement
deletes a file from disk.
e.g.
See also shell.
local labels can now have the same name in different procs (v1c)
Syntax: lbound(array[, dimension])
Type: function
Lbound returns the lowest index that can be used in the array 'array'.
Optionally 'dimension' says what dimension to check the lowest bound. 1 for
first dimension, and 2 for second dimension etc.
e.g.
Syntax: lcase$ (text$)
Type: function
returns the input string making all letters in lower case.
e.g.
See also ucase$.
Syntax: left$(text$, n)
Type: function
returns 'n' amount of characters starting from the left of 'text$'.
e.g.
See also right$, mid$ (function).
Syntax: len(variable)
Type: function
Returns the size of a variable in bytes. This can be used with strings (returns
the length in characters), integers, custom types, etc.
LEN() now accepts PTR's when used with ENUM's and UDT's (v1c)
LEN() can now handle arrays with no indexes given, as in QB (v1c)
e.g.
This is similar to the cc++ command 'sizeof()'.
Differences:
Between QB:
Works with UDT's and types too.
e.g.
Syntax: [let ]variable = value
Type: statement
Useless command that does nothing, simply compadible with old basic dialects.
e.g. these two lines have the same effect:
As you can see the let statement is not needed.
Differences:
New to FreeBasic.
Syntax: line [[step] (x1, y1)]-[step] (x2, y2)[, [color][, [b|bf][, style]]]
Type: statement
Category: Gfx
Graphics statement that draws a straight line or a box between two points.
LINE coordinates are affected by last WINDOW and
VIEW (graphics) statements, and respect clipping
rect set by VIEW (graphics).
e.g. draws a diagonal red line with a white box, and waits for 3 seconds
See also circle, window,
view (graphics).
Syntax: LINE INPUT[;] ["promptstring";] stringvariable
Type: statement
Category: Input
To read an entire line of text from the keyboard input and store in a
variable.
v1c, unfinished.
Type: statement
Category: File
LOBYTE
LOWORD, HIWORD, LOBYTE and HIBYTE intrinsic macros (v1c)
Syntax: loc (file slot)
Type: function
Category: File
Returns the position with an open file (in binary mode).
See also lof, open.
Differences:
Between QB:
No support to file modes other than the binary file mode.
Type: keyword
Category: Error
LOCAL keyword to be used with ON ERROR statments, when inside sub-routines (v1c)
Syntax: locate [row][, column]
Type: statement
Category: Console
Sets the console cursor to the row and column given.
Row is the up-down position in the console.
Column is the left-right position in the console.
Differences:
Between QB:
there are no cursor, start and stop optional arguments.
Syntax: LOCK fileslot [, {record | [start] TO end}]
Type: statement
Category: File
Lock will restrict access to a file or part of a file if given the record
number or the start and end positions.
Lock is useful when multiple programs, people, or threads are trying to access
the same file.
See unlock for the opposite command. Unlock uses the same
syntax, so to properly lock and unlock a file you will give the same paramaters
to unlock that you did to lock.
e.g. locking a file, reading 100 bytes, and unlocking it. To run, make sure
there exists a file called 'file.ext' in the current directory that is at least
100 bytes.
Syntax: lof (file slot)
Type: function
Category: File
Returns the length of file of an open file given the file slot.
e.g.
Syntax: log (number)
Type: function
Category: math
Returns the logarithm of the input 'number' with log base e (natural log). e
is approximately 2.718.
To calculate the log base x of a number one would do this:
Type: data type
See integer, since so far, integers and longs are the
same.
See also
data types.
Type: keyword
Category: control flow
See do...loop.
LOWORD
LOWORD, HIWORD, LOBYTE and HIBYTE intrinsic macros (v1c)
Syntax: lset string_var, string_expression
Type: statement
Category: File
LSET left justifies text into the string buffer 'string_var', filling the
left part of the string with 'string_expression' and the right part with spaces.
e.g.
See also rset, space$, put (file i/o), mkd$, mki$, mkl$, mks$.
Differences:
Between QB:
syntax is "LSET dst, src" not "LSET dst = src"
Type: function
Ltrim (left trim) trims the leading white space.
e.g.
See also rtrim$.