Syntax: ABS (number)
Type: function
Category: math
ABS returns the positive number of the number given.
e.g:
Syntax: ACCESS {read | write | read write}
Type: clause
Category: files
ACCESS is used with the open statement.
This example shows how to open the file "data.raw" with read access, in
binary mode, in file slot 1.
Type: function
Category: math
See also atn.
Differences:
New to FreeBasic.
Type: clause
ALIAS gives a procedure in a library a new name that you want to reference it
with.
For example if there is a sub called xClearScreen and you want to reference it
with the name ClearVideoScreen, here is sample code to do so:
Syntax: (function( byval bytes as integer ) as any ptr)
Type: function
Allocates as much memory as you want (in bytes) and returns a pointer to the
beginning. This allows for flexible and dynamic arrays that can be created and
destroyed.
e.g. of a dynamic array using allocate and pointers to access an array and
calculate the mean average of all values:
See also deallocate.
Differences:
New to FreeBasic.
Syntax: number1 AND number2
Type: operator
Category: logic
Bitwise comparison which compares bits in two numbers and sets the
corresponding bit in the result to 1 if both bits are 1, otherwise sets the bit
in the result to 0.
Example with (&b0110 AND &b0101)
0110 0101 ---- 0100
result: &b0110
Type: clause
Used to disable type checking for a variable that is a parameter of a
procedure.
Example:
(this code has not been verified to work)
Type: keyword
Category: file mode
The APPEND keyword is used with the OPEN statement which
opens the file with the APPEND file mode. This means that the file is opened
with sequential access and starts reading/writing at the end of the file.
See this external resource for examples and more info:
http://www.petesqbsite.com/sections/express/issue4/index.html#filemanip.
See also open, PRINT #,
WRITE (File I/O), random.
array fields can now be passed by descriptor, as in "array(idx).arrayfield()" (v1c)
Type: clause
AS is a language construct with many uses which vary where you use it.
Specify variable type in a list with:
sub
declare sub
function
declare function
common
dim
redim
shared
static
Specify variable type within a user defined type with type
Set the file slot number for the file to be opened in with open.
Specify a field name in a random-access record with field
Differences:
Between QB:
AS is no longer used with the command name. See details of
name for more information.
Syntax: ASC(string) as integer
Type: function
Returns the ascii code of the first character in the string. This has the
opposite effect of chr$.
ASC now has an optional parameter to retrieve a char at a specific position as
in "c = asc( "abc", 2 )" (v1c)
e.g.
Will return "the ascii code of 'a' is: 97".
Type: function
Category: math
Allows the use of inline assembly (machine code) used.
the ASM statement can be used on a single line as in "ASM mov eax, 1234" (v1c)
Syntax:
asm ... 'asm code end asm
e.g. multiplying two integers with asm.
Differences:
New to FreeBasic
Type: function
Category: math
Syntax: ATN(number)
Type: function
Category: math
Returns the arc tangent (or anti-tangent) of the number given. This is the opposite of tan (tangent).