Type: conditional
see if...then.
Type: keyword
Category: conditional
see if...then.
Syntax: END [sub | function | if | select | type | enum | return value as
integer]
Type: statement
This will end the program or end a code block.
If used with the parameter sub, function, if, select , type, or enum it will end
that code block respectively.
If used with no parameter it will end the program and return to the OS.
If used with an integer value it will end the program and return that value to
the OS. This is like the C 'return 0;' feature.
If a parameter is given then this end's a block definition (sub, function, if,
select, type, or enumeration block).
Differences:
Between QB:
supports returning an integer result to OS
Type: keyword
Category: conditional
See also if...then.
Type: statement
ENUM's can now be nameless (v1c)
Syntax:
enum listname
item1 [= integer value]
item2 [= integer value]
item3 [= integer value]
...
end enum
enum (short for enumeration) creates a numbered list with items that correspond
to discrete values.
(v1c, im too lazy..)
Differences:
New to FreeBasic.
Type: statement
Category: Misc
See setenviron.
Differences:
Between QB:
called setenviron now.
Syntax: environ$(var_name$) as string
Type: function
Category: Misc
Returns the value of a system environment variable.
E.g. to show the system variable "path":
See also Setenviron, shell.
Syntax: EOF(f)
Type: function
EOF stands for end-of-file and returns true if any given file open for
reading is at the end (no more data can be read from the file, there is no more).
This allows one to read all data from a file, and know when all the data has
been read.
e.g.
See also LOF.
Syntax: a EQV b
Type: operator
Category: logic
A bitwise operator which compares each bit in the two numbers and returns
true for each bit where the coresponding bits in both inputs are true.
i.e.
&b00110011 EQV &b01010101
will return &b00010001.
See also
Logical operators.
Syntax: Erase array [, array...]
Type: statement
Erases dynamic arrays from memory, or clears all elements in a static array.
ERASE should accept multiple arguments (v1c)
ERASE now accepts non-dynamic arrays and fills them with 0's (v1c)
Type: function
Category: Error
After an error, returns the error code that occured.
Differences:
Between QB:
error numbers are not the same as in QB.
ERR:
"CONS:" and "ERR:" special file names, to open the console for i/o access and
the std error for output (v1c)
Type: statement
Category: Error
Pretends an error has occured. This can be used to simulate custom error
numbers.
e.g. to send an error alert of error 150 (just some arbitrary error code) one
would do the following:
See also err.
Differences:
Between QB:
error numbers are not the same as in QB.
Syntax: (function( program as string, arguments as string ) as integer)
Type: function
Differences:
New to FreeBasic.
Syntax: exepath as string
Type: function
Returns the path of the progam itself. Usually the same as
curdir$.
e.g.
Differences:
New to FreeBasic.
Syntax: exit {sub | function | do | for | while}
Type: statement
Category: control flow
Leaves a code block such as a sub,
function, do...loop,
while...wend, or a for...next block.
e.g. the print command will not be seen
See also exit.
Syntax: EXP(a)
Type: function
Category: math
Returns e to the power of a number given.
e.g. EXP(5) returns e ^ 5.
e is a constant that is roughly 2.718. In theory it has infinite precision but
is approximated on computers for a practical sense.
'------- DLL code ---------------
declare function fEmpty cdecl lib "Empty" alias "fEmpty" (byval tr as byte) as
long
'$include: 'DllMain.bi'
'*********************'
function fEmpty cdecl (byval tr as byte) as long export
end function
'------ end DLL code ---------------