REM


 [Features] Comments are put in.

 [Format] REM [sentence]

 [Explanation]
    The following sentence isn't executed.
    It is omissible by (').

 [e.g.]



  LET


 [Features] To assign the value to a variable.

 [Format] [LET] variable[$]=value

 [Explanation]
    'let' is omissible. (In SQL mode, it isn't omissible.)
    Capital letter and Small letter are distinguished and are processed as another variable.
    Please also read "[func]statement-Notes of global variable definition position."

 [e.g.]
    let n=2
    m=4
    dim d(4) : d(0)=8
    ss$="hello"
    print ss$;n;m;d(0)
 (Result)
    hello 2 4 8


  DIM


 [Features] Arrays variable is declared.

 [Format] DIM variable[$](a[,b][,c]...) [,variable[$]...]

 [Explanation]
    Subscripts(a[,b][,c]...) are specified.
    Multidimensional array is possible.
    Range that can be used is (0~subscript)
    When it is character array, attach '$' in the variable name.

 [e.g.]
    dim member(20,10),name$(20)
    member(15,5)=164
    print member(15,5)
    erase member



  ERASE


 [Features] To eliminate arrays from a program.

 [Format] ERASE variable[$][,variable[$]]...

 [Explanation]
    What can be erased is a variable which can be referred to with the current scope.

 [e.g.]



  DATA


 [Features] To store the numeric and string that are accessed by 'READ'statement.

 [Format] DATA data1[,data2]...

 [Explanation]
    'DATA'statement can be placement anywhere.
    Character string data, Form enclosed in double quotation, it is not, either is OK.

 [e.g.] [smp_data.bas]
  10 read a,b
  20 print a;b
  30 read s1$,s2$
  40 print s1$;s2$
  50 print "Line:";dtl
  60 restore 120
  70 read s1$,s2$
  80 print s1$;s2$
  90 'Datagroup
  100 data 10,11,12,abc
  110 data 20,21,22
  120 data Apple,"Orange"
  (Result)
   10 11
  12abc
  Line: 110
  AppleOrange


  READ


 [Features] To read values from 'DATA'statement and assign them to variables.

 [Format] READ variable[$][,variable[$]]...

 [Explanation]
    The character variable can read the data of both numerical value and character string.
    In a numeric variable, it can read only numeric data.

 [e.g.]



  RESTORE


 [Features] To specification the line number of 'DATA' accessed by 'READ'.

 [Format] RESTORE [linenumber]

 [Explanation]
    If a line number is omitted, it will become a head position of data.

 [e.g.]


  DTL


 [Features] The line number read in the 'READ'statement is held and returned.

 [Format] 

 [Explanation]

 [e.g.]
    if dtl=500 then restore



  SWAP


 [Features] It swap the values of two numeric variables.

 [Format] SWAP (array)variable1, (array)variable2

 [Explanation]
    It can be used for array variable.
    (with number of arrangement element)

 [e.g.]<br>  st=5:dt=12
    swap st,dt
    print st;dt
 (Result)
     12  5



  SEARCH  (Function)


 [Features] To find specified 'search value' from numeric array variable, and return the 'subscript-number'.

 [Format] SEARCH( Numeric-array-variable-name,search-value[,start-subscript[,step-value]] )

 [Explanation]
    To find specified 'search value' from numeric array variable and return the 'subscript-number'.
    If not found, it return -1.
    Array variables must be primary array.
    It must be declared by 'DIM' beforehand.
    It specify at 'start-subscript' for 'where to start searching'.
    The default is 0.
    Specifying 'step value' is looking for at the interval.
    The default is 1.

 [e.g.]
    dim as(10)
    as(4)=45
    as(7)=28
    print search(as,28)
 (Result)
     7


  RANGE


 [Features] The numeric value variable is formed within specified range.

 [Format] RANGE (array)variable, min, max, [L]

 [Explanation]
    When the value of variable is smaller than 'min' of specified,
     it's formed into 'min', bigger than 'max' then it's formed into 'max'.
    Also be able to use array variable of numerical. (specifying subscript)
    When 'L' switch is specified (lower case OK),
     'min' & 'max' is regarded with connected like loop form,
     and the overflowing portion is added to the reverse side, the value is formed.

 [e.g.]
     num=120: range num,-50,100: print num
      100
     OK
     num=120: range num,-50,100,l: print num
      -30
     OK



  CLEAR


 [Features] All Variable initialization, and Area size of (string & numeric)variable are determined.

 [Format] CLEAR [string-variable-area-size] [,numeric-variable-area-size]

 [Explanation]
    All the variables are initialized. (in the same state as startup)
    Opened files are closed.
    All the interruption will be in OFF state.
    Random generator series is initialized.
    In the state of the first, String - 4000, Numeric - 100000.
    String variable have another actual data store area separate from this value.
    (The length of one string is free)
    The omitted will keep the previous values.

 [e.g.]
    clear ,200000
    dim mc(200000)
    'Immediately after specifying, the array of size can be defined at the maximum.


  VARPTR


 [Features] To return the address of a variable stored in the variable area.

 [Format] VARPTR("variable-name")

 [Explanation]
    It is used in combination with 'BSAVE','BLOAD',
     and be used to Into & out of numeric array variable.

 [e.g.] [smp_varptr.bas]
    100 dim az(12)
   110az(0)=8:az(1)=345:az(2)=-24
    120 bsave "da.dat",varptr("az")
    130 erase az
    140 dim az(12)
    150 bload "da.dat",varptr("az")
    160 print az(0)
    170 print az(1)
    180 print az(2)
  (Result)
    8
    345
    -24



  BSAVE


 [Features] Data of variable area of memory is saved at a file.

 [Format] BSAVE "file-name",variable-area-address

 [Explanation]
    The address of numerical array to save is specified using 'VARPTR' function.
    The value of array is a decimal omitted,
     and changed into 2-byte signed integer, and be saved.
    The kind, can be saved is only numerical array.
    The length of the array end is determined automatically.

 [e.g.]
    dim sh(9,9)
    bsave "sh.var",varptr("sh")< BR>



  BLOAD


 [Features] Data is read into the variable area of memory from a file.

 [Format] BLOAD "file-name",variable-area-address

 [Explanation]
    The address of numerical array to load is specified using 'VARPTR' function.
    Array to be read must be the same size as it is saved.

 [e.g.]
    dim gd(4095)
    bload "gd.var",varptr("gd")< BR>