System Variables of ver1.x
Name | 1.1 | 1.2f | Memo |
system | * | - | ?? |
cnt | * | - | loop counter |
err | * | - | return value of MCI command ( error code ) |
csrx | * | - | x-coordinate of mouse cursor ( result of getcsr ) |
csry | * | - | y-coordinate of mouse cursor ( result of getcsr ) |
hspver | * | - | version number of HSP(10 as 1.0) |
gmode | * | - | 0 on palette mode; otherwise 1 |
dispx | * | - | x-coordinate of screen |
dispy | * | - | y-coordinate of screen |
rval | * | - | Red value of the color which is read by pget |
gval | * | - | Blue value of the color which is read by pget |
bval | * | - | Green value of the color which is read by pget |
spx | * | - | x-coordinate of sprite |
spy | * | - | y-coordinate of sprite |
spat | * | - | attribute #1 of sprite |
stat | * | - | attribute #2 of sprite |
System Variables of ver2.x
Name | 2.1 | 2.2 | 2.2c | 2.2d | 2.2e | 2.3c | 2.3d | 2.4 | 2.4c | 2.4d | 2.4e | 2.4f | 2.4g | 2.4h | 2.5 | 2.55 | 2.6 | Memo |
system | - | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | ?? |
hspstat | x | x | x | x | x | x | x | x | x | x | x | x | x | x | * | - | - | runtime information |
hspver | O(*1) | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | O | - | - | version number of HSP($10 as 1.0) |
cnt | - | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | O | - | - | loop counter |
err | O | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | error code |
stat | O | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | various status of command (return value) |
dispx | - | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | x-coordinate of screen |
dispy | - | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | y-coordinate of screen |
paluse | O(*2) | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | 0 on palette mode; otherwise 1 |
mousex | * | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | x-coordinate of mouse pointer |
mousey | * | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | y-coordinate of mouse pointer |
rval | - | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | red intensity |
gval | - | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | green intensity |
bval | - | - | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | blue intensity |
cmdline | x | * | - | - | - | - | - | - | O(*3) | - | - | - | - | O | O/o | O | - | command line arguments |
winx | x | * | - | - | - | - | - | - | O(*3) | - | - | - | - | - | O | - | - | width of client area(drawing area) |
winy | x | * | - | - | - | - | - | - | O(*3) | - | - | - | - | - | O | - | - | height of client area(drawing area) |
strsize | x | * | - | - | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | read size in bytes |
csrx | x | x | x | * | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | x-coordinate of current position |
csry | x | x | x | * | - | - | - | - | O(*3) | - | - | - | - | - | - | - | - | y-coordinate of current position |
looplev | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | * | - | nest level of the loop |
sublev | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | * | O | nest level of the sub-routine and/or the module |
wparam | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | * | - | system value of Windows in interrupt (wParam) |
lparam | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | * | - | system value of Windows in interrupt (lParam) |
iparam | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | * | - | cause of interrupt |
windir | x | x | x | x | * | - | - | - | O(*3) | - | - | - | - | - | - | - | - | the full path of the Windows directory |
curdir | x | x | x | x | x | * | - | - | O(*3) | - | - | - | - | - | - | - | - | the full path of the current directory |
exedir | x | x | x | x | x | x | x | x | * | - | - | - | - | - | O | - | - | the full path of the directory containing the executable file |
refstr | x | x | x | x | x | * | - | - | O(*3) | - | - | - | - | - | O | O | - | selected filename on the dialog and/or string returned by plugins |
prmx | x | x | x | x | x | x | * | - | O(*3) | - | - | - | - | - | - | - | - | x value of ginfo |
prmy | x | x | x | x | x | x | * | - | O(*3) | - | - | - | - | - | - | - | - | y value of ginfo |
*1) Its notation is changed from hexadecimal to decimal.
*2) Its name is changed from gmode to paluse.
*3) Direct assignment for system values came to impossible.
Representations
Class | Representation | 1.1 | 1.2f | 2.1 | 2.2 | 2.2c | 2.2d | 2.2e | 2.3c | 2.3d | 2.4 | 2.4c | 2.4d | 2.4e | 2.4f | 2.4g | 2.4h | 2.5 | 2.55 | 2.6 | Memo |
Number | -32768 through 32767 -> -2147483648 through 2147483647 | * | - | O(*4) | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | integer(decimal) |
$0 through $FFFFFFFF(0x...) (4digits->8digits) | * | - | O(*4) | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | integer(hex) |
%0 through %111...11(0b...) (32digits) | x | x | * | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | O(*11) | integer(binary) |
1.0k | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | * | - | fixed decimal(integer) |
1.0f | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | * | - | single precision floating-point(float) |
1.0d | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | # | # | double precision floating-point(double) |
'A' | * | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | o | o | - | character code |
Operator | + - * / | * | - | - | - | - | - | - | - | o | - | o | - | - | - | - | - | - | - | o | addition, subtraction, multiplication, division |
% -> \ | * | - | O(*5) | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | modulo |
= | * | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | O(*12) | assignment |
+,++ -,-- | x | x | * | - | - | - | - | - | - | O(*8) | - | - | - | - | - | - | - | - | - | increment, decrement |
+= -= | x | x | * | - | - | - | - | - | - | - | - | - | - | - | o | - | - | - | - | complex operator |
( ) | x | x | x | x | x | x | * | - | - | - | - | - | - | - | - | o | - | o | - | bracket |
!,!=,not =,== | * | - | - | - | - | - | - | O(*6) | - | O(*9) | o | - | - | - | - | - | - | - | O(*13) | not equal to, equal to |
&,&&,and |,||,or ^,xor | * | - | - | - | - | - | - | O(*7) | - | - | - | - | - | - | - | - | - | - | O(*13) | bit operation(and, or, exclusive or) |
< > | * | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | less than, greater than |
<= >= | x | x | x | x | x | x | x | x | x | * | - | - | - | - | - | - | - | - | - | less than or equal to, greater than or equal to |
{ } -> << >> | * | - | - | - | - | - | - | - | - | O(*5) | - | - | - | - | - | - | O(*10) | - | - | (arithmetic) bit shift(left, right) |
{ } | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | * | - | o | multiple statement |
A=1,2,3,4,... A.i=1,2,3,4... | x | x | x | x | x | x | x | x | x | * | - | - | - | - | - | - | - | - | - | contiguous assignment for array |
Comment | ;, // | * | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | O(*14) | single-line comment |
/* */ | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | * | multi-line comment |
*4) Numeric representation was extended from 16bits to 32bits.
*5) The sign of the operator was changed.
*6) The representation -
not was enabled.
*7) The representations -
and,
or and
xor were enabled.
*8) The representations -
++ and
-- were enabled.
*9) The representations -
!= and
== were enabled.
*10) The meaning of the operators -
{ and
} was chaged.
*11) This representation was disenabled in macro.(measure: use
#const instead of
#define.)
*12) Buffer over-run error came to be checked in the case of string.
*13) The representations -
and,
or,
xor and
not were changed to macro.
*14) The representation -
// was enabled.