:hp2.Comments:ehp2.:lm margin=14.The :hp2.Begin Dialog:ehp2. statement is used to start the dialog-box
declaration for a user-defined dialog box&per. :lm margin=1.
:li.
:lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments give the coordinates that position the
dialog box&per. These coordinates designate the position of the upper left corner
of the dialog box, relative to the upper left corner of the client area of the
parent window&per. The :hp1.x:ehp1. argument is measured in units that are 1/4 the average
width of the system font&per. The :hp1.y :ehp1.argument is measured in units 1/8 the height
of the system font&per. (E&per.g&per., to position a dialog box 20 characters in, and 15
characters down from the upper left hand corner, enter 80, 120 as the :hp1.x, y :ehp1.
coordinates&per.) If these arguments are omitted, the dialog box is centered in
the client area of the parent window&per. :lm margin=1.
:li.
:lm margin=14.The:hp1. dx :ehp1.and :hp1.dy:ehp1. arguments specify the width and height of the dialog
box (relative to the:hp1. x:ehp1. and :hp1.y :ehp1.coordinates)&per. The :hp1.dx:ehp1. argument is measured in 1/4
system-font character-width units&per. The :hp1.dy :ehp1.argument is measured in 1/8
system-font character-width units&per. (I&per.e&per., to create a dialog box 80 characters
wide, and 15 characters in height, enter 320, 120 as the :hp1.dx, dy :ehp1.coordinates&per.):lm margin=1.
:li.
:lm margin=14.The :hp2.Begin Dialog:ehp2. statement assumes that if only two arguments are
given, they are the :hp1.dx:ehp1. (width) and :hp1.dy:ehp1. (height) arguments&per. :lm margin=1.
:li.
:lm margin=14.Unless the :hp2.Begin Dialog:ehp2. statement is followed by at least one
other dialog-box definition statement and the :hp2.End Dialog:ehp2. statement, an error
will result&per. The other definition statement must include an :link reftype=hd res=12055.:hp7.OkButton:ehp7.:elink. or :link reftype=hd res=10205.:hp7.
CancelButton:ehp7.:elink. or :link reftype=hd res=10120.:hp7.Button:ehp7.:elink. statement&per. If this statement is left out, there will be
no way to close the dialog box, and the procedure will be unable to continue
executing&per. :lm margin=1.
:li.
:lm margin=14.To display the dialog box, you create a dialog record variable
with the :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. statement, and then display the dialog box using the :link reftype=hd res=10550.:hp7.Dialog:ehp7.:elink.
statement&per. In the :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. statement, :hp1.dialogName:ehp1. is used to identify the dialog
:hp2.Comments:ehp2.:lm margin=14.The :hp2.ButtonGroup :ehp2.statement begins definition of the buttons when
custom buttons are to be used&per. :hp2.ButtonGroup :ehp2.establishes the dialog-record
field that will contain the user's selection&per. If :hp2.ButtonGroup :ehp2.is used, it must
appear before any :link reftype=hd res=10120.:hp7.Button:ehp7.:elink. statement which creates a pushbutton&per. Only one :hp2.
ButtonGroup :ehp2.statement is allowed within a dialog box definition&per.:lm margin=1.
:li.
:lm margin=14.The :hp2.ButtonGroup :ehp2.statement can only be used between a :hp7.Begin:ehp7.:hp5. :ehp5.:link reftype=hd res=10115.:hp7.Dialog:ehp7.:elink.
and an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
:hp2.Returns:ehp2.:lm margin=14.The :hp2.CDbl:ehp2. function converts a :hp1.numeric-expression:ehp1. to
double-precision floating point&per.:lm margin=1.
:li.
:li.
:hp2.Comments:ehp2.:lm margin=14.The argument given is any :hp1.numeric -expression:ehp1.&per. :lm margin=1.
:li.
:lm margin=14. :hp2.CDbl:ehp2. generates the same result as you would get by assigning the :hp1.
numeric -expression:ehp1. to a :hp2.Double:ehp2. variable&per.To convert a numeric expression to a
different data type, see :link reftype=hd res=10227.:hp7.CInt:ehp7.:elink., :link reftype=hd res=10229.:hp7.CLng:ehp7.:elink. and :link reftype=hd res=10445.:hp7.CSng:ehp7.:elink.&per.:lm margin=1.
:hp2.Co:ehp2.:hp2.mments:ehp2.:lm margin=14.The :hp2.CheckBox :ehp2.statement can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink.
and an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
:li.
:lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments give the coordinates that position the check
box&per. These coordinates designate the position of the upper left corner of the
check box, relative to the upper left corner of the dialog box&per. The :hp1.x:ehp1. argument
is measured in 1/4 system-font character-width units&per. The :hp1.y :ehp1.argument is
measured in 1/8 system-font character-height units&per. (See :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink.&per.) :lm margin=1.
:li.
:lm margin=14.The:hp1. dx :ehp1.argument is the combined width of the check box and the
text$ field&per. Because proportional spacing is used, the width will vary with the
characters used&per. To approximate the width, multiply the number of characters in
the:hp1. text$:ehp1. field (including blanks and punctuation) by 4 and add 12 for the
checkbox&per. :lm margin=1.
:li.
:lm margin=14.The :hp1.dy:ehp1. argument is the height of the :hp1.text$:ehp1. field&per. A :hp1.dy:ehp1. value of
12is standard, and should cover typical default fonts&per. If larger fonts are
used, the value should be increased&per. As the :hp1.dy:ehp1. number grows, the checkbox and
the accompanying text will move downward within the dialog box&per.:lm margin=1.
:li.
:lm margin=14.The:hp1. text$:ehp1. field contains the title shown to the right of the check
box&per. If the width of this string is greater than dx, trailing characters will
be truncated&per. If you wish to include underlined characters so that the check
box selection can be made from the keyboard, the character must be preceded
with an ampersand (&.)&per.:lm margin=1.
:li.
:lm margin=14.The :hp1.&per.field :ehp1.argument is the name of the dialog-record field that
will hold the current check box setting&per. If its value is 0, the box is
unchecked; if its value is -1 the box will be greyed; if its value is 1, the
box will be checked&per. SBL will treat any other value of :hp1.&per.field :ehp1.the same as a 1&per.:lm margin=1.
:hp2.Returns:ehp2.:lm margin=14.The :hp2.CInt:ehp2. function converts a :hp1.numeric-expression:ehp1. to integer by
rounding&per.:lm margin=1.
:li.
:li.
:hp2.Comments:ehp2.:lm margin=14.The argument given is any :hp1.numeric -expression:ehp1.&per. After rounding,
the resulting number must be within the range of -32767 to 32767, or an error
will occur&per.:lm margin=1.
:li.
:lm margin=14. :hp2.CInt:ehp2. generates the same result as you would get by assigning the :hp1.
numeric -expression:ehp1. to an :hp2.Integer:ehp2. variable&per. The :link reftype=hd res=11310.:hp7.Int:ehp7.:elink. and :link reftype=hd res=10730.:hp7.Fix:ehp7.:elink. functions can also
be uset to convert a numeric expression to an integer, but perform truncation&per.
To convert a numeric expression to a different data type, see :link reftype=hd res=10209.:hp7.CDbl:ehp7.:elink., :link reftype=hd res=10229.:hp7.CLng:ehp7.:elink. and :link reftype=hd res=10445.:hp7.
:hp2.Returns:ehp2.:lm margin=14.The :hp2.CLng:ehp2. function converts a :hp1.numeric-expression:ehp1. to long by
rounding&per.:lm margin=1.
:li.
:li.
:hp2.Comments:ehp2.:lm margin=14.The argument given is any :hp1.numeric -expression:ehp1.&per. After rounding,
the resulting number must be within the range of -2,147,483,648 to
2,147,483,647, or an error will occur&per.:lm margin=1.
:li.
:lm margin=14. :hp2.CLng:ehp2. generates the same result as you would get by assigning the :hp1.
numeric -expression:ehp1. to a :hp2.Long:ehp2. variable&per. To convert a numeric expression to a
different data type, see :link reftype=hd res=10209.:hp7.CDbl:ehp7.:elink., :link reftype=hd res=10227.:hp7.CInt:ehp7.:elink. and :link reftype=hd res=10445.:hp7.CSng:ehp7.:elink.&per.:lm margin=1.
:hp2.Returns:ehp2.:lm margin=14.The :hp2.CSng:ehp2. function converts a :hp1.numeric-expression:ehp1. to
single-precision floating point&per.:lm margin=1.
:li.
:li.
:hp2.Comments:ehp2.:lm margin=14.The argument given is any :hp1.numeric -expression:ehp1.&per. The :hp1.
numeric-expression:ehp1. must have a value within the range allowed for the :hp2.Single:ehp2.
data type, or an error will occur&per. :lm margin=1.
:li.
:lm margin=14. :hp2.CSng:ehp2. generates the same result as you would get by assigning the :hp1.
numeric -expression:ehp1. to a :hp2.Single:ehp2. variable&per. To convert a numeric expression to
a different data type, see :link reftype=hd res=10209.:hp7.CDbl:ehp7.:elink., :link reftype=hd res=10227.:hp7.CInt:ehp7.:elink. and :link reftype=hd res=10229.:hp7.CLng:ehp7.:elink.&per.:lm margin=1.
:lm margin=14.the procedure is to be found in a Dynamic Link Library (DLL) named :hp1.
libName:ehp1.&per. The :hp1.ordinal :ehp1.argument specifies the ordinal number of the procedure
within the external DLL&per. If the :hp1.ordinal :ehp1.is not specified, the DLL function
will be accessed by name, which may cause the module to load more slowly&per. It
is recommended that the :hp1.ordinal :ehp1.be used whenever possible&per.:lm margin=1.
:li.
:lm margin=14.A forward declaration is needed only when a procedure in the
current module is referenced before it is used&per. In this case, the :hp2.BasicLib:ehp2., :hp2.Lib:ehp2.
and :hp2.Alias :ehp2.clauses are not used&per.:lm margin=1.
:li.
:lm margin=14.A :link reftype=hd res=12500.:hp7.Sub:ehp7.:elink. procedure does not return a value&per. :link reftype=hd res=10900.:hp7.Function:ehp7.:elink. returns a
value, and can be used in an expression&per. :link reftype=hd res=10900.:hp7.Function:ehp7.:elink. names must end with a type
character&per. This specifies the return value of the function&per. The :hp1.name:ehp1. argument
names the :link reftype=hd res=12500.:hp7.Sub:ehp7.:elink. or :link reftype=hd res=10900.:hp7.Function:ehp7.:elink. being declared&per. :lm margin=1.
:li.
:lm margin=14.The :hp1.parameters :ehp1.are specified as a comma-separated list of
parameter names&per. The data type of a parameter may be specified by using a :link reftype=hd res=4.:hp5.type
character:ehp5.:elink. or by using the :hp2.As:ehp2. clause&per. Record parameters are declared by using
an :hp2.As:ehp2. clause and a :hp1.type:ehp1. which has previously been defined using the :link reftype=hd res=12560.:hp7.Type:ehp7.:elink.
statement&per. Array parameters are indicated by using empty parentheses after the :hp1.
parameter:ehp1.&per. Array dimensions are not specified in the :hp2.Declare:ehp2. statement&per.:lm margin=1.
:li.
:lm margin=14.External DLL procedures are called with the PASCAL calling
convention (the actual arguments are pushed on the stack from left to right)&per.
By default, the actual arguments are passed by far reference&per. For external DLL
procedures, there are two additional keywords, :hp2.ByVal:ehp2. and :hp2.Any:ehp2., that can be used
in the parameter list&per. :lm margin=1.
:li.
:lm margin=14.When :hp2.ByVal:ehp2. is used, it must be specified before the parameter it
modifies&per. When applied to numeric data types, :hp2.ByVal:ehp2. indicates that the
parameter is passed by value, not by reference&per. When applied to string
parameters, :hp2.ByVal:ehp2. indicates that the string is passed by far pointer to the
string data&per. By default, strings are passed by far pointer to a string
descriptor&per.:lm margin=1.
:li.
:lm margin=14.:hp2.Any:ehp2. can be used as a type specification, and permits a call to the
procedure to pass a value of any datatype&per. When :hp2.Any:ehp2. is used, type checking on
the actual argument used in calls to the procedure is disabled (although other
arguments not declared as type :hp2.Any:ehp2. are fully type-safe)&per. The actual argument
is passed by far reference, unless :hp2.ByVal:ehp2. is specified, in which case the actual
value is placed on the stack (or a pointer to the string in the case of string
data)&per. :hp2.ByVal:ehp2. may also be used in the call It is the external DLL procedure's
responsibility to determine the type and size of the passed-in value&per.:lm margin=1.
:li.
:lm margin=14.SBL supports two different behaviours when an empty string ("") is
passed :hp2.ByVal:ehp2. to an external procedure&per. The implementor of SBL can specify
which behaviour by using the SBL API function :hp2.SblSetInstanceFlags:ehp2.&per. In any
specific implementation which uses SBL, one of these two behaviours should be
used consistently&per. We recommend the second behaviour, which is compatible with
Microsoft's VB Language&per. The following two paragraphs describe the two
possible behaviours&per. This paragraph, and one of the two following paragraphs
should be removed for the final documentation&per.:lm margin=1.
:li.
:lm margin=14.When an empty string ("") is passed :hp2.ByVal:ehp2. to an external
procedure, the external procedure will receive a NULL pointer&per. If you wish to
send a valid pointer to an empty string, use :link reftype=hd res=10225.:hp7.Chr$(0):ehp7.:elink.&per. :lm margin=1.
:li.
:lm margin=14.When an empty string ("") is passed :hp2.ByVal:ehp2. to an external
procedure, the external procedure will receive a valid (non-NULL) pointer to a
character of 0&per. To send a NULL pointer, :hp2.Declare:ehp2. the procedure argument as :hp2.
ByVal As Any:ehp2., and call the procedure with an argument of :hp2.0&.:ehp2.&per.:lm margin=1.
:hp2.Comments:ehp2.:lm margin=14.The :hp2.Def:ehp2.:hp3.type:ehp3. statement specifies the default :link reftype=hd res=20100.:hp5.data type:ehp5.:elink. of a
variable which begins with one of the letters specified in :hp1.varTypeLetters:ehp1.&per.:lm margin=1.
:li.
:lm margin=14.The :hp1.varTypeLetters:ehp1. are specified as a comma-separated list of
letters; a range of letters may also be specified&per. For example, a-d indicates
the letters a,b,c and d&per.:lm margin=1.
:li.
:lm margin=14.The case of the letters is not important, even in a letter range&per.
The letter range a-z is treated as a special case - it denotes all alpha
characters, including the international characters&per.:lm margin=1.
:li.
:lm margin=14.The :hp2.Def:ehp2.:hp3.type:ehp3. statement only affects the module in which it is
spacified&per. It must precede any variable definition within the module&per.:lm margin=1.
:li.
:lm margin=14.Variables defined using the Global or Dim may override the :hp2.Def:ehp2.:hp3.type:ehp3.
statement by using an :hp2.As:ehp2. clause or a :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink.&per.:lm margin=1.
:lm margin=14.Records are made up of a collection of data elements called
fields&per. These fields may be of any numeric, string, or previously-defined
record type&per. See :link reftype=hd res=12560.:hp7.Type:ehp7.:elink. for details on accessing fields within a record&per.:lm margin=1.
:li.
:lm margin=14.You can also use the :hp2.Dim:ehp2. statement to declare a dialog record&per. In
this case :hp1.type:ehp1. is specified as [:hp2.Dialog:ehp2.]:hp1.dialogName:ehp1., where :hp1.dialogName:ehp1. matches a
dialog box name previously defined using :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink.&per. The dialog record
variable can then be used in a :link reftype=hd res=10550.:hp7.Dialog:ehp7.:elink. statement&per.:lm margin=1.
:li.
:lm margin=14.Dialog records have the same behaviour as regular records - they
differ only in the way they are defined&per. Some applications may provide a
number of pre-defined dialog boxes&per.:lm margin=1.
:li.
:li.
:lm margin=14.:hp2.Arrays:ehp2.:lm margin=1.
:li.
:lm margin=14.The available :link reftype=hd res=20100.:hp5.data types:ehp5.:elink. for arrays are&colon. numbers, strings, and
records&per. Arrays of arrays, :link reftype=hd res=20300.:hp5.dialog box records:ehp5.:elink., and :link reftype=hd res=20200.:hp5.ADTs:ehp5.:elink. are not supported&per.:lm margin=1.
:li.
:lm margin=14.Array variables are declared by including a subscript list as
part of the :hp1.variableName:ehp1.&per. The syntax to use for :hp1.variableName:ehp1.is&colon.
:hp2.Returns:ehp2.:lm margin=14.:hp2.Erl:ehp2. returns the line number where an error was trapped&per.:lm margin=1.
:li.
:li.
:hp2.Comments:ehp2.:lm margin=14.Using the :link reftype=hd res=12095.:hp7.Resume:ehp7.:elink. or :link reftype=hd res=12060.:hp7.On Error:ehp7.:elink. statements will reset the :hp2.Erl:ehp2. value
to 0&per. If you wish to maintain the value of the line number returned by :hp2.Erl:ehp2.,
you should assign it to a variable&per.:lm margin=1.
:li.
:lm margin=14.The value of the :hp2.Erl:ehp2. function can be set indirectly through the :link reftype=hd res=10650.:hp5.
:hp2.Returns:ehp2.:lm margin=14.:hp2.E:ehp2.:hp2.rr:ehp2. returns the run-time error code for the last error that was
trapped&per.:lm margin=1.
:li.
:li.
:hp2.Comments:ehp2.:lm margin=14.Using the :link reftype=hd res=12095.:hp7.Resume:ehp7.:elink. or :link reftype=hd res=12060.:hp7.On Error:ehp7.:elink. statements will reset the :hp2.Err:ehp2. value
to 0&per. If you wish to maintain the value of the error code returned by :hp2.Err:ehp2., you
should assign it to a variable&per.:lm margin=1.
:li.
:lm margin=14.The value of the :hp2.Err:ehp2. function can be set directly through the :hp2.Err:ehp2.
statement, and indirectly through the :link reftype=hd res=10650.:hp7.Error:ehp7.:elink. statement&per. :lm margin=1.
:li.
:lm margin=14.The :link reftype=hd res=1.:hp5.Trappable Errors:ehp5.:elink. are listed in an appendix&per.:lm margin=1.
:hp2.Comments:ehp2.:lm margin=14.:hp2.Exit Do:ehp2. and :hp2.Exit For:ehp2. terminate loop statements&per. :hp2.Exit Do:ehp2. can only
be used within a :link reftype=hd res=10612.:hp7.Do&per.&per.&per.Loop:ehp7.:elink. statement&per. :hp2.Exit For:ehp2. can only be used within a :link reftype=hd res=10740.:hp7.
For&per.&per.&per.Next:ehp7.:elink. statement&per. In both cases, control is transferred to the statement
which follows the loop statement&per. When used within a nested loop, an Exit
statement moves control out of the immediately enclosing loop&per.:lm margin=1.
:li.
:lm margin=14.The :hp2.Exit Function :ehp2.and :hp2.Exit Su:ehp2.:hp2.b:ehp2. statements transfer control from
the current procedure back to the original calling procedure&per. :hp2.Exit Function :ehp2.
must be used in a :link reftype=hd res=10900.:hp7.Function:ehp7.:elink. procedure&per. :hp2.Exit Sub:ehp2. can only be used to exit from a :link reftype=hd res=12500.:hp7.
:hp2.Returns:ehp2.:lm margin=14.The :hp2.FileAttr:ehp2. function returns information about an open file&per.
Depending on the attribute chosen, this information is either the file mode or
the operating system handle&per.:lm margin=1.
:li.
:li.
:hp2.Comments:ehp2.:lm margin=14.The argument :hp1.filenumber%:ehp1. is the number used in the :link reftype=hd res=12070.:hp7.Open:ehp7.:elink. statement
to open the file&per. The argument :hp1.attribute%:ehp1. is either a 1 or 2&per. The following
table lists the return values and corresponding file modes if :hp1.attribute%:ehp1. is 1&colon.:lm margin=1.
:lm margin=14.Records are made up of a collection of data elements called
fields&per. These fields may be of any numeric, string, or previously-defined
record type&per. See :link reftype=hd res=12560.:hp7.Type:ehp7.:elink. for details on accessing fields within a record&per.:lm margin=1.
:li.
:lm margin=14.You can not use the :hp2.Global:ehp2. statement to declare a dialog record&per.:lm margin=1.
:li.
:li.
:lm margin=14.:hp2.Arrays:ehp2.:lm margin=1.
:li.
:lm margin=14.The available :link reftype=hd res=20100.:hp5.data types:ehp5.:elink. for arrays are&colon. numbers, strings, and
records&per. Arrays of arrays, :link reftype=hd res=20300.:hp5.dialog box records:ehp5.:elink., and :link reftype=hd res=20200.:hp5.ADTs:ehp5.:elink. are not supported&per.:lm margin=1.
:li.
:lm margin=14.Array variables are declared by including a subscript list as
part of the :hp1.variableName:ehp1.&per. The syntax to use for :hp1.variableName:ehp1.is&colon.
:hp2.Comments:ehp2.:lm margin=14.:hp2.GoTo:ehp2. sends control to a :hp1.label:ehp1.&per. SBL does not support the use of
line numbers&per.:lm margin=1.
:li.
:lm margin=14.A :link reftype=fn refid=glos_label.:hp5.label:ehp5.:elink. has the same format as any other BASIC :link reftype=fn refid=glos_name.:hp5.name:ehp5.:elink.&per. To be
recognized as a label, a name must begin in the first column, and be followed
immediately by a colon ("&colon.")&per. Reserved words are not valid labels&per.:lm margin=1.
:li.
:lm margin=14.:hp2.GoTo:ehp2. cannot be used to transfer control out of the current
:hp2.Comments:ehp2.:lm margin=14.The ListBox statement is used to create a list of choices&per. :lm margin=1.
:li.
:lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments give the coordinates that the upper left
corner of the list box, relative to the upper left corner of the dialog box&per.
The :hp1.x:ehp1. argument is measured in 1/4 system-font character-width units&per. The :hp1.y :ehp1.
argument is measured in 1/8 system-font character-width units&per. (See :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink.
&per.) :lm margin=1.
:li.
:lm margin=14.The :hp2.ListBox:ehp2. statement can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. and
an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
:li.
:lm margin=14.The:hp1. dx :ehp1.and:hp1. dy :ehp1.arguments specify the width and height of the list
box&per.:lm margin=1.
:li.
:lm margin=14.The:hp1. text$:ehp1. argument is a string containing the selections for the
list box&per. This string must be defined, using a :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. Statement, before the :link reftype=hd res=10115.:hp7.Begin
Dialog:ehp7.:elink. statement is executed&per. The arguments in the :hp1.text$:ehp1. string are entered as
:hp2.Syntax:ehp2.:lm margin=14.:hp2.Open:ehp2.:hp1. filename$:ehp1.:hp2. For :ehp2.:hp1.mode:ehp1.:hp2. As [:ehp2.:hp1.#:ehp1.:hp2.] :ehp2.:hp1.filenumber%:ehp1.:lm margin=1.
:li.
:li.
:hp2.Comment:ehp2.:hp2.s:ehp2.:lm margin=14.The :hp2.Open:ehp2. statement enables I/O to a file or a device&per. A file must
be opened before any input/output operation can be performed on it&per. :lm margin=1.
:li.
:lm margin=14.The argument :hp1.filename$:ehp1. is a string expression specifying the file
to open&per. :hp1.Mode:ehp1. is a keyword that specifies one of the following&colon. :hp2.Input:ehp2.
(sequential input mode), :hp2.Output:ehp2. (sequential output mode), or :hp2.Append:ehp2. (sequential
output mode)&per.:lm margin=1.
:li.
:lm margin=14.:hp1.Filenumber%:ehp1. is an integer expression with a value between 1 and
255&per. The :link reftype=hd res=10750.:hp7.FreeFile:ehp7.:elink. function can be used to return the next available filenumber&per.:lm margin=1.
:li.
:esl.
:h2 x=right y=bottom width=50% height=100% res=12073.Option Base
:hp2.Comments:ehp2.:lm margin=14.The :hp2.OptionGro:ehp2.:hp2.up:ehp2. statement is used in conjunction with :link reftype=hd res=12075.:hp7.OptionButton:ehp7.:elink.
statements to set up a series of related options&per. The :hp2.OptionGroup:ehp2. Statement
begins definition of the option buttons and establishes the dialog-record field
that will contain the current option selection&per. :hp1.&per.Field:ehp1. will contain a value 0
when the choice associated with the first :link reftype=hd res=12075.:hp7.OptionButton:ehp7.:elink. statement is selected, a
value of 1 when the choice associated with the second :link reftype=hd res=12075.:hp7.OptionButton:ehp7.:elink. statement is
chosen, etc&per. :lm margin=1.
:li.
:lm margin=14.The :hp2.OptionG:ehp2.:hp2.roup:ehp2. statement can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink.
and an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
:hp2.Comments:ehp2.:lm margin=14.You use the :hp2.ReDim:ehp2. statement to change the upper and lower bounds
of a dynamic array's dimensions&per. Memory for the dynamic array will be
reallocated to support the specified dimensions, and the array elements will be
reinitialized&per. :hp2.ReDim:ehp2. can not be used at the module level - it must be used
inside of a procedure&per.:lm margin=1.
:li.
:lm margin=14.A dynamic array is normally created by using :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. to declare an
array without a specified :hp1.subscriptRange:ehp1.&per. The maximum number of dimensions for
a dynamic array created in this fashion is 8&per. If you need more than 8
dimensions, you may use the :hp2.ReDim:ehp2. statement inside of a procedure to declare an
array which has not previously been declared using :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. or :link reftype=hd res=11050.:hp7.Global:ehp7.:elink.&per. In this
case, the maximum number of dimensions allowed is 60&per.:lm margin=1.
:li.
:lm margin=14.The available :link reftype=hd res=20100.:hp5.data types:ehp5.:elink. for arrays are&colon. numbers, strings, and
records&per. Arrays of arrays, :link reftype=hd res=20300.:hp5.dialog box records:ehp5.:elink., and :link reftype=hd res=20200.:hp5.ADTs:ehp5.:elink. are not supported&per.:lm margin=1.
:li.
:lm margin=14.If the :hp2.As:ehp2. clause is not used, the type of the variable may be
specified by using a :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink. as a suffix to the name&per. The two different
type-specification methods can be intermixed in a single :hp2.ReDim:ehp2. statement
(although not on the same variable)&per.:lm margin=1.
:li.
:lm margin=14.The :hp2.ReDim:ehp2. statement cannot be used to change the number of
dimensions of a dynamic array once the array has been given dimensions&per. It can
only to change the upper and lower bounds of the dimensions of the array&per. The :link reftype=hd res=11360.:hp7.
LBound:ehp7.:elink. and :link reftype=hd res=12580.:hp7.UBound:ehp7.:elink. functions can be used to query the current bounds of an array
variable's dimensions&per.:lm margin=1.
:li.
:lm margin=14.Care should be taken to avoid :hp2.ReDim:ehp2.'ing an array in a procedure
that has received a reference to an element in the array in an argument; the
result is unpredictable&per.:lm margin=1.
:li.
:lm margin=14.The :hp1.subscriptRange :ehp1.is of the format&colon.
:hp2.Returns:ehp2.:lm margin=14.The :hp2.UBound:ehp2. function returns the upper bound of the subscript range
for the specified :hp1.dimension:ehp1. of the :hp1.arrayVariable:ehp1.&per. :lm margin=1.
:li.
:li.
:hp2.Comments:ehp2.:lm margin=14.The dimensions of an array are numbered starting with 1&per. If the :hp1.
dimension:ehp1. is not specified, 1 is used as a default&per. :lm margin=1.
:li.
:link reftype=hd res=11360.:lm margin=14.:hp7.LBound:ehp7.:elink. can be used with :hp2.UBound:ehp2. to determine the length of an array&per.:lm margin=1.
The following table lists the runtime errors which SBL returns&per. These errors
can be trapped by :link reftype=hd res=12060.:hp7.OnError:ehp7.:elink.&per. The :link reftype=hd res=10645.:hp7.Err:ehp7.:elink. function can be used to query the error
code, and the :link reftype=hd res=10655.:hp7.Error$:ehp7.:elink. function can be used to query the error text&per.