Wednesday, December 19, 2007
vars in bcx basic
bcx basic manual home
types of variables
$ .. string variable ex a$
% .. numeric example a%
! .. numeric example a!
# .. numeric pounds I think example a#
example dim x as dword. The variable is then &x (apparently anyway). GLOBAL can also be used
dword :Double word
LPWORD : long pointer word?
LDOUBLE : long double
integer :integer
DOUBLE :double
string :string
ULONG
STRARRAY :string array
handle :this is a windows handle
LPSTR :32 bit string POINTER variable
COORD :x,y coordinates
WIN32_FIND_DATA
SYSTEMTIME :System Time
OSVERSIONINFO :Operating version info
QWERTY :querty keyboard
example
GLOBAL h AS QWERTY
h.a = 3
HWND :Windows handle
MSG
WNDCLASSEX
RECT :rectangle (I would guess)
FARPROC : far procedure??
HMODULE
dim A$
declares A$ to be global usualy is declared at the top of a program
GLOBAL h AS QWERTY
this does pretty much the same thing as dim
Local X!
Declares X! To be loace to the function or subroutine
TYPE is used to create a custom data type. It works a lot like many versions of pascal.
TYPE Zzz
DIM x
DIM y
DIM z
DIM p AS RECT
END TYPE
You can now use the TYPE just like any other basic var..
LOCAL cb AS Zzz
You would then access the various members by using the type name and then a period followed by the name of the variable such as the simple example below
cb.x = 1
DIM SHARED i, j, a$, Stak$[41]
I am not realy sure of the purpose of the shared keyword it appears that you can use it like the global keyword and then use it also in the subroutines
DATA
This is traditionally at the end of the program in basic..
example
Dim i
While data$ [i] <> "EndOfData"
Print data$ [i]
Incr i
Wend
DATA "111","222","333","444"
DATA "555","666","777","888"
DATA "999","EndOfData"
set ... end set.. this looks a little like a combination of the DATA keyword and type
SET A[] AS DOUBLE
1,5,9,3,10,4 ' Small Set Of Sample Data
END SET
DIM DYNAMIC
DIM STATIC
DIM RAW
you can define your variables as static or dynamic
redim probily works simular to other basic languages i.e. No docs
redim preserve a$[20]
redim a$[20]
types of variables
$ .. string variable ex a$
% .. numeric example a%
! .. numeric example a!
# .. numeric pounds I think example a#
example dim x as dword. The variable is then &x (apparently anyway). GLOBAL can also be used
dword :Double word
LPWORD : long pointer word?
LDOUBLE : long double
integer :integer
DOUBLE :double
string :string
ULONG
STRARRAY :string array
handle :this is a windows handle
LPSTR :32 bit string POINTER variable
COORD :x,y coordinates
WIN32_FIND_DATA
SYSTEMTIME :System Time
OSVERSIONINFO :Operating version info
QWERTY :querty keyboard
example
GLOBAL h AS QWERTY
h.a = 3
HWND :Windows handle
MSG
WNDCLASSEX
RECT :rectangle (I would guess)
FARPROC : far procedure??
HMODULE
dim A$
declares A$ to be global usualy is declared at the top of a program
GLOBAL h AS QWERTY
this does pretty much the same thing as dim
Local X!
Declares X! To be loace to the function or subroutine
TYPE is used to create a custom data type. It works a lot like many versions of pascal.
TYPE Zzz
DIM x
DIM y
DIM z
DIM p AS RECT
END TYPE
You can now use the TYPE just like any other basic var..
LOCAL cb AS Zzz
You would then access the various members by using the type name and then a period followed by the name of the variable such as the simple example below
cb.x = 1
DIM SHARED i, j, a$, Stak$[41]
I am not realy sure of the purpose of the shared keyword it appears that you can use it like the global keyword and then use it also in the subroutines
DATA
This is traditionally at the end of the program in basic..
example
Dim i
While data$ [i] <> "EndOfData"
Print data$ [i]
Incr i
Wend
DATA "111","222","333","444"
DATA "555","666","777","888"
DATA "999","EndOfData"
set ... end set.. this looks a little like a combination of the DATA keyword and type
SET A[] AS DOUBLE
1,5,9,3,10,4 ' Small Set Of Sample Data
END SET
DIM DYNAMIC
DIM STATIC
DIM RAW
you can define your variables as static or dynamic
redim probily works simular to other basic languages i.e. No docs
redim preserve a$[20]
redim a$[20]
Comments:
<< Home
www.10000smileyfaces.com
Hi, my name is Ezequiel and I want to invite you to be a part of the Smiley Faces Community, link your blog and raise your visits. We created this website for everyone who want to tell something to the whole world.
Post a Comment
Hi, my name is Ezequiel and I want to invite you to be a part of the Smiley Faces Community, link your blog and raise your visits. We created this website for everyone who want to tell something to the whole world.
<< Home