NetBasic API Reference


DOC:Address

Module:DOC.NLM
Purpose:Add an ADDRESS tag to the HTML document.
Purpose:DOC:Address(sAddressInfo)
Description:The ADDRESS HTML tag is normally used to specify the author of an HTML document. This tag is not for intended for adding postal addresses.
See Also:**
Example:DOC:Address("Copyright (c) 1996, Acme Wingnuts Corp. All Rights Reserved")

Go to Table of Contents

DOC:Body

Module:DOC.NLM
Purpose:Begin definition of the HTML document's body.
Syntax:DOC:Body([<sBGColor>[, <sTextColor>[, <sLinkColor>[, <sBGGraphic>]]]])
Description:An HTML document contains two logical parts: the heading and the body. To start the BODY definition, use the DOC:Body API, and, optionally specify the document colors and background graphic. A predefined set of constants which may be used for any of the color parameters can be found in the header file HTML.H.
See Also:DOC:Address
Example:DOC:Body(DOC_WHITE, DOC_GREEN, DOC_BLUE)

Go to Table of Contents

DOC:Break

Module:DOC.NLM
Purpose:Add a logical line break to the HTML document.
Syntax:DOC:Break
Description:Adds a line break to the HTML document, so output will continue on the next line in the browser.
Outputs:Logical
See Also:DOC:Paragraph181
Example:DOC:Break

Go to Table of Contents

DOC:Env:Get

Module:DOC.NLM
Purpose:Read the value of an HTML environment variable.
Syntax:<sValue> = DOC:Env:Get(<sVarName>)
Description:Reads an CGI environment variable, and returns a string representing the current value. These are the environment variables currently defined:

PATH
SERVER_SOFTWARE
SERVER_NAME
GATEWAY_INTERFACE
SERVER_PROTOCOL
REQUEST_METHOD
HTTP_ACCEPT
HTTP_USER_AGENT
PATH_INFO
PATH_TRANSLATED
SCRIPT_NAME
QUERY_STRING
REMOTE_HOST
REMOTE_ADDR
AUTH_TYPE
REMOTE_USER
REMOTE_IDENT
CONTENT_TYPE
Outputs:String
See Also:DOC:Var()
Example:sname = DOC:Env:Get("SERVER_NAME")
DOC:Print("Server name is ",sname); NewLine

Go to Table of Contents

DOC:Form:Begin

Module:DOC.NLM
Purpose:Begin definition of an HTML Form.
Syntax:DOC:Form:Begin(<sURL>)
Description:Begins the definition of an HTML form. The HTML FORM tag allows the creation of interactive forms. That is, you can create a page that allows a user to input data such as name, address, etc., into a form, that is passed on to another script for processing. For example, you could create an order entry system using the WEB.
Note:Forms cannot be nested. That is, you cannot define a form while another form is currently being defined.
See Also:DOC:Form:End
Example:DOC:Form:Begin("/netbasic/process.bas")

Go to Table of Contents

DOC:Form:End

Module:DOC.NLM
Purpose:Ends the definition of a Form
Syntax:DOC:Form:End()
Description:After defining all of the input fields for a form, use DOC:Form:End() to complete the form definition within the HTML document.
See Also:DOC:Form:Begin
Example:DOC:Form:End()

Go to Table of Contents

DOC:Form:Input:Checkbox

Module:DOC.NLM
Purpose:Define a checkbox within a Form.
Syntax:DOC:Form:Input:Checkbox(<sVar>,<sValue>,<sText>,<bCheck>[,iAlign])
Description:Defines a checkbox field within an HTML form. <sVar> is the name of the CGI variable which will contain <sValue>, if the field is "checked" when the form is submitted. <sText> is a string that will be displayed immediately to the right of the checkbox field. <bCheck> is a Boolean value which if TRUE, causes the field to be checked by default. The optional iAlign is used to specify the alignment (See HTML.H, constants: DOC_ALIGN_xxx for a complete list of alignment values).
See Also:DOC:Form:Input:Hidden, DOC:Form:Input:Radio, DOC:Form:Input:Text
Example:DOC:Form:Input:Checkbox("cbox","1","Please check here for more info",FALSE)

Go to Table of Contents

DOC:Form:Input:Hidden

Module:DOC.NLM
Purpose:Defines a hidden input field within a Form.
Syntax:DOC:Form:Input:Hidden(<sVariable>,<sValue>)
Description:Defines a hidden input field within an HTML form. <sVariable> is the name of the CGI variable which will contain <sValue>. When the form is submitted the this information will be passed to the next page.
See Also:DOC:Form:Input:Password, DOC:Form:Input:Text
Example:DOC:Form:Input:Checkbox("cbox","1","Please check here for more info",FALSE)

Go to Table of Contents

DOC:Form:Input:Password

Module:DOC.NLM
Purpose:Define a password input area.
Syntax:<lSuccess> = DOC:Form:Input:Password(<sVariable>[, <sValue> [,<sLabel>[, <sMaxlength>[, <sSize>[, <iAlign>]]]]])
Description:Creates a form sub-element input type for entering secure input. The actual text entered will not be displayed as entered, instead a "*" will be displayed in it place. When the form is submitted the value entered will be written to <sVariable>. <sValue> is the default value displayed in the field. <sLabel> is label displayed to the left of the input box. <sMaxlength> defines the length of the input variable and <sSize> defines the horizontal size of the input area. The optional iAlign is used to specify the alignment (See HTML.H, constants: DOC_ALIGN_xxx for a complete list of alignment values).
Outputs:Logical
See Also:DOC:Form:Input:Hidden,DOC:Form:Input:Text
Example:DOC:Form:Input:Password("var2","x","Password: ")

Go to Table of Contents

DOC:Form:Input:Radio

Module:DOC.NLM
Purpose:Define a radio button.
Syntax:<lSuccess> = DOC:Form:Input:Radio(<sVariable>, <sValue>, <sMessage>, <lChecked>[, iAlign])
Description:Define a radio button inside a form. <sVariable> is the name of the CGI variable that the value <sValue> will be written to, if the radio button is selected when the form is submitted. <lChecked> specifies whether the radio button is initially selected. <sMessage> is a string that will be written to the right of the button. You may specify an empty string, if you don't want this printed. In order to create multiple mutually exclusive radio buttons, simply use the same CGI variable name each time you call it. The optional iAlign is used to specify the alignment (See HTML.H, constants: DOC_ALIGN_xxx for a complete list of alignment values).
Outputs:Logical
See Also:****
Example:DOC:Form:Input:Radio("rad", "Radio1","Radio Button 1",FALSE) Newline
DOC:Form:Input:Radio("rad", "Radio2","Radio Button 2",TRUE)
Newline
DOC:Form:Input:Radio("rad", "Radio3","Radio Button 3",FALSE) Newline
DOC:Form:Input:Radio("rad", "Radio4","Radio Button 4",FALSE) Newline

Go to Table of Contents

DOC:Form:Input:Reset

Module:DOC.NLM
Purpose:Add a reset form to defaults button.
Syntax:<lSuccess> = DOC:Form:Input:Reset(<sValue>[, iAlign])
Description:Add a reset form to defaults button. Value specifies the string to write as the button text. The optional iAlign is used to specify the alignment (See HTML.H, constants: DOC_ALIGN_xxx for a complete list of alignment values).
Outputs:Logical
See Also:****
Example:Success = DOC:Form:Input:Reset("Defaults")

Go to Table of Contents

DOC:Form:Input:Submit

Module:DOC.NLM
Purpose:Add a submit form button.
Syntax:<lSuccess> = DOC:Form:Input:Submit(<sValue>[, iAlign])
Description:Add a submit form button. <sValue> specifies the string to write as the buttons text. The optional iAlign is used to specify the alignment (See HTML.H, constants: DOC_ALIGN_xxx for a complete list of alignment values).
Outputs:Logical
See Also:****
Example:DOC:Form:Input:Submit("Submit")

Go to Table of Contents

DOC:Form:Input:Text

Module:DOC.NLM
Purpose:Define a text input area.
Syntax:<lSuccess> = DOC:Form:Input:Text(<sVariable>[, <sValue> [,<sLabel>[, <iMaxlength>[, <iSize>[, iAlign]]]]])
Description:Creates a form sub-element input type for entering text. When the form is submitted the value entered will be written to <sVariable>. <sValue> is the default value displayed in the field. <sLabel> is label displayed to the left of the input box. <sMaxlength> defines the length of the input variable and <sSize> defines the horizontal size of the input area. The optional iAlign is used to specify the alignment (See HTML.H, constants: DOC_ALIGN_xxx for a complete list of alignment values).
Outputs:Logical
See Also:DOC:Form:Input:Hidden,DOC:Form:Input:Password
Example:DOC:Form:Input:Text("var1", "Initial Value", "Username: ")

Go to Table of Contents

DOC:Form:Select:Begin

Module:DOC.NLM
Purpose:Start definition of a combo box.
Syntax:<lSuccess> = DOC:Form:Select:Begin(<sVariable>[, <iSize> [, <lMultiple>[, iAlign]]])
Description:Start definition of a combo box. <sVariable> specifies the CGI variable that will contain the item that is selected. <iSize> specifies the number of items that will be displayed in the combo box at one time. <lMultiple> specifies whether or not multiple items can be selected in the combo box. The optional iAlign is used to specify the alignment (See HTML.H, constants: DOC_ALIGN_xxx for a complete list of alignment values).
Outputs:Logical
See Also:DOC:Form:Select:Option, DOC:Form:Select:End
Example:DOC:Form:Select:Begin("selvar",5,TRUE)
DOC:Form:Select:Option("Apples")
DOC:Form:Select:Option("Oranges",TRUE)
DOC:Form:Select:Option("Pears")
DOC:Form:Select:Option("Bananas")
DOC:Form:Select:Option("Cherries")
DOC:Form:Select:End

Go to Table of Contents

DOC:Form:Select:End

Module:DOC.NLM
Purpose:End definition of a combo box.
Syntax:<lSuccess> = DOC:Form:Select:End
Description:End definition of a combo box that was initiated using DOC:Form:Select:Begin.
Outputs:Logical
See Also:DOC:Form:Select:Begin, DOC:Form:Select:Option
Example:DOC:Form:Select:Begin("selvar",5,TRUE)
DOC:Form:Select:Option("Apples")
DOC:Form:Select:Option("Oranges",TRUE)
DOC:Form:Select:Option("Pears")
DOC:Form:Select:Option("Bananas")
DOC:Form:Select:Option("Cherries")
DOC:Form:Select:End

Go to Table of Contents

DOC:Form:Select:Option

Module:DOC.NLM
Purpose:Add an option to a combo box.
Syntax:<lSuccess> = DOC:Form:Select:Option(<sOption> [<sValue>[,<lSelected>]])
Description:Add an option to a combo box. <sOption> is the option text. <sValue> is an optional parameter which specifies the value that will be written to the CGI variable if <sOption> is selected. If <sValue> is not specified, or is an empty string, <sOption> is written to the CGI variable. <lSelected> is a Boolean that signals whether this will be the default item that is selected in the combo box.
Outputs:Logical
See Also:DOC:Form:Select:Begin, DOC:Form:Select:End
Example:DOC:Form:Select:Begin("selvar",5,TRUE)
DOC:Form:Select:Option("Apples")
DOC:Form:Select:Option("Oranges",TRUE)
DOC:Form:Select:Option("Pears")
DOC:Form:Select:Option("Bananas")
DOC:Form:Select:Option("Cherries")
DOC:Form:Select:End

Go to Table of Contents

DOC:Form:Textarea

Module:DOC.NLM
Purpose:Define a text edit box
Syntax:DOC:Form:Textarea(<sVariable>, <iRows>, <iColumns>, <sText>)
Description:Create a text box containing "text", whose dimensions are <iRows> by <iCols>. The string stored in <sText> will be displayed in the text area when it is created. When the form is submitted the value entered will be written to <sVariable>.
Outputs:N/A
See Also:DOC:Form:Textarea:Add, DOC:Form:Textarea:Begin, DOC:Form:Textarea:End
Example:DOC:Form:Textarea()

Go to Table of Contents

DOC:Form:Textarea:Add

Module:DOC.NLM
Purpose:Add a line to a text edit box.
Syntax:DOC:Form:Textarea:Add(<sData>)
Description:Adds data <sData> to a textarea defined by DOC:Form:Textarea:Begin.
Outputs:N/A
See Also:DOC:Form:Textarea:Begin, DOC:Form:Textarea:End
Example:Success = DOC:Form:Textarea:Begin("auto",10,60)
DOC:Form:Textarea:Add("Text box line 1"+ Chr(13))
DOC:Form:Textarea:Add("Text box line 2"+ Chr(13))
Success = DOC:Form:Textarea:End

Go to Table of Contents

DOC:Form:Textarea:Begin

Module:DOC.NLM
Purpose:Define beginning of a text edit box.
Syntax:<lSuccess> = DOC:Form:Textarea:Begin(<sVariable>,<iRows>,<iCols>[, iAlign])
Description:Creates a text edit box containing "text", whose dimensions are <iRows> * <iCols>. When the form is submitted the information is stored in <sVariable>. The optional iAlign is used to specify the alignment (See HTML.H, constants: DOC_ALIGN_xxx for a complete list of alignment values).
Outputs:Logical
See Also:DOC:Form:Textarea:Add, DOC:Form:Textarea:End
Example:Success = DOC:Form:Textarea:Begin("auto",10,60)
DOC:Form:Textarea:Add("Text box line 1"+ Chr(13))
DOC:Form:Textarea:Add("Text box line 2"+ Chr(13))
Success = DOC:Form:Textarea:End

Go to Table of Contents

DOC:Form:Textarea:End

Module:DOC.NLM
Purpose:Define end a text edit box.
Syntax:<lSuccess> = DOC:Form:Textarea:End
Description:Ends the instance of a textarea created by DOC:Form:Textarea:Begin.
Outputs:Logical
See Also:DOC:Form:Textarea:Begin, DOC:Form:Textarea:End
Example:Success = DOC:Form:Textarea:Begin("auto",10,60)
DOC:Form:Textarea:Add("Text box line 1"+ Chr(13))
DOC:Form:Textarea:Add("Text box line 2"+ Chr(13))
Success = DOC:Form:Textarea:End

Go to Table of Contents

DOC:Format

Module:DOC.NLM
Purpose:Enable or Disable HTML formatting.
Syntax:DOC:Format(<bHTMLFormatting >)
Description:By default, the DOC component adds carriage-return sequences to the HTML document after each DOC request is issued. This aids in the readability of the HTML document, when the HTML source is viewed within the browser. However, in some instances, adding the carriage returns will alter the document layout (e.g. when writing pre-formatted text). In these instances, you can disable the carriage returns by using DOC:Format.
See Also:**
Example:lSuccess = DOC:Format(FALSE); REM disable the CR formatting

Go to Table of Contents

DOC:Heading

Module:DOC.NLM
Purpose:Add a title to the HTML document.
Syntax:<lSuccess> = DOC:Heading(<sTitle>)
Description:Add a title to the HTML document.
Outputs:Logical
See Also:DOC:Body
Example:DOC:Heading("Test form")

Go to Table of Contents

DOC:HR

Module:DOC.NLM
Purpose:Add a horizontal rule.
Syntax:<lSuccess> = DOC:HR(<iSize>,<iWidth>)
Description:Add a horizontal rule to the HTML document. <iWidth> specifies how wide the rule is, and <iSize> defines the percentage of the browser window which the rule will extend to.
Outputs:Logical
See Also:****
Example:Success = DOC:HR(5,20)

Go to Table of Contents

DOC:Image

Module:DOC.NLM
Purpose:Adds an image to the document.
Syntax:DOC:Image(<sFilename>,<sAlt>[, <iHeight> [, <iWidth> [, <iAlign>]]])
Description:Places an inline image into the HTML document. The image is located in the file <sFilename>. sAlt specifies an in-place display of the image. Optionally, you can specify the preferred height and width of the image, as well as the alignment.
Outputs:N/A
See Also:****
Example:DOC:Image("Logo1","Logo")

Go to Table of Contents

DOC:Link:Button

Module:DOC.NLM
Purpose:Define a button link.
Syntax:<lSuccess> = DOC:Link:Button(<sHREF>,<sText>)
Description:Creates a hypertext reference button to another script or WEB server. The value displayed on the button is <sText> and when it is press the hypertext reference <sHREF> will be invoked.
Outputs:Logical
See Also:DOC:Link:Graphic, DOC:Link:Text
Example:DOC:Link:Text(URL("test.bas"),"test link")

Go to Table of Contents

DOC:Link:Graphic

Module:DOC.NLM
Purpose:Define a graphic link.
Syntax:<lSuccess> = DOC:Link:Graphic(<sHREF>,<sFilename>)
Description:Creates a graphical hypertext reference to another script or WEB server. The image displayed is <sFilename> and when it is selected the hypertext reference <sHREF> will be invoked.
Note:Store your GIF files in the SYS:WEB/DOCS directory, so the WEB server can locate them.
Outputs:Logical
See Also:DOC:Link:Button, DOC:Link:Text
Example:DOC:Link:Graphic("http://206.67.187.53/netbasic/fileview.bas","/test.jpg")

Go to Table of Contents

DOC:Link:Text

Module:DOC.NLM
Purpose:Define a text link.
Syntax:<lSuccess> = DOC:Link:Text(<sHREF>,<sText>)
Description:Creates a text hypertext reference to another script or WEB server. The value displayed on the page is <sText> and when it is selected the hypertext reference <sHREF> will be invoked.
Outputs:Logical
See Also:DOC:Link:Button, DOC:Link:Graphic
Example:DOC:Link:Text("/netbasic/user/test.bas","test link")

Go to Table of Contents

DOC:List:Bullet

Module:DOC.NLM
Purpose:Create a bulleted list.
Syntax:DOC:List:Bullet(<Item1> [, <Item2> [, <Item3> [, ... [,<Item15>]]]])
Description:Create a bulleted list for each parameter specified.
Outputs:N/A
See Also:DOC:List:Bullet:Add, DOC:List:Bullet:Begin, DOC:List:Bullet:End
Example:DOC:List:Bullet("Bullet Item Number 1","Bullet Item Number 2")

Go to Table of Contents

DOC:List:Bullet:Add

Module:DOC.NLM
Purpose:Add an item to a bulleted list.
Syntax:<lSuccess> = DOC:List:Bullet:Add(<sHREF>)
Description:Add an item to a bulleted list.
Outputs:Logical
See Also:DOC:List:Bullet, DOC:List:Bullet:Begin, DOC:List:Bullet:End
Example:DOC:List:Bullet:Begin
DOC:List:Bullet:Add("Bullet Item Number 1")
DOC:List:Bullet:Add("Bullet Item Number 2")
DOC:List:Bullet:Add("Bullet Item Number 3")
DOC:List:Bullet:End

Go to Table of Contents

DOC:List:Bullet:Begin

Module:DOC.NLM
Purpose:Start definition of bulleted list.
Syntax:<lSuccess> = DOC:List:Bullet:Begin
Description:Start definition of bulleted list.
Outputs:Logical
See Also:DOC:List:Bullet, DOC:List:Bullet:Add, DOC:List:Bullet:End
Example:DOC:List:Bullet:Begin
DOC:List:Bullet:Add("Bullet Item Number 1")
DOC:List:Bullet:Add("Bullet Item Number 2")
DOC:List:Bullet:Add("Bullet Item Number 3")
DOC:List:Bullet:End

Go to Table of Contents

DOC:List:Bullet:End

Module:DOC.NLM
Purpose:End definition of a bulleted list.
Syntax:<lSuccess> = DOC:List:Bullet:End
Description:End definition of a bulleted list started by DOC:List:Bullet:Begin.
Outputs:Logical
See Also:DOC:List:Bullet, DOC:List:Bullet:Begin, DOC:List:Bullet:Add
Example:DOC:List:Bullet:Begin
DOC:List:Bullet:Add("Bullet Item Number 1")
DOC:List:Bullet:Add("Bullet Item Number 2")
DOC:List:Bullet:Add("Bullet Item Number 3")
DOC:List:Bullet:End

Go to Table of Contents

DOC:List:Number

Module:DOC.NLM
Purpose:Create a numbered list.
Syntax:DOC:List:Number(Item1> [, <xItem2> [, <xItem3> [, ... [,<xItem15>]]]])
Description:Create a numbered list containing each parameter specified in Item1> through <xItem15>.
Outputs:N/A
See Also:DOC:List:Number, DOC:List:Number:Begin, DOC:List:Number:End
Example:DOC:List:Number("List Item Number 1","List Item Number 2")

Go to Table of Contents

DOC:List:Number:Add

Module:DOC.NLM
Purpose:Add an item to a numbered list.
Syntax:<lSuccess> = DOC:List:Number:Add(<sHREF>)
Description:Add an item to a numbered list.
Outputs:Logical
See Also:DOC:List:Number, DOC:List:Number:Begin, DOC:List:Number:End
Example:DOC:List:Number:Begin
DOC:List:Number:Add("List Item Number 1")
DOC:List:Number:Add("List Item Number 2")
DOC:List:Number:Add("List Item Number 3")
DOC:List:Number:Add("List Item Number 4")
DOC:List:Number:End

Go to Table of Contents

DOC:List:Number:Begin

Module:DOC.NLM
Purpose:Start definition of numbered list.
Syntax:<lSuccess> = DOC:List:Number:Begin
Description:Start definition of numbered list.
Outputs:Logical
See Also:DOC:List:Number, DOC:List:Number:Add, DOC:List:Number:End
Example:DOC:List:Number:Begin
DOC:List:Number:Add("List Item Number 1")
DOC:List:Number:Add("List Item Number 2")
DOC:List:Number:Add("List Item Number 3")
DOC:List:Number:Add("List Item Number 4")
DOC:List:Number:End

Go to Table of Contents

DOC:List:Number:End

Module:DOC.NLM
Purpose:End definition of a numbered list.
Syntax:<lSuccess> = DOC:List:Number:End
Description:End definition of a numbered list.
Outputs:Logical
See Also:DOC:List:Number, DOC:List:Number:Begin, DOC:List:Number:Add
Example:DOC:List:Number:Begin
DOC:List:Number:Add("List Item Number 1")
DOC:List:Number:Add("List Item Number 2")
DOC:List:Number:Add("List Item Number 3")
DOC:List:Number:Add("List Item Number 4")
DOC:List:Number:End

Go to Table of Contents

DOC:Paragraph

Module:DOC.NLM
Purpose:Start a new paragraph.
Syntax:<lSuccess> = DOC:Paragraph
Description:Start a new paragraph in the HTML document.
Outputs:Logical
See Also:****
Example:DOC:Paragraph

Go to Table of Contents

DOC:Print

Module:DOC.NLM
Purpose:Print data to the HTML document.
Syntax:DOC:Print(Item1> [, <xItem2> [, <xItem3> [, ... [,<xItem16>]]]])
Description:Writes the information contained in each parameter specified, Item1> through <xItem16>, to the HTML document.
Note:It is possible to wrap a HTML tag around the information written by DOC:Print. This is done by extending the API to DOC:Print:<Tag>. An example of this is DOC:Print:Pre, which will surround the output with <Pre> and </Pre>.The interpreter will detect if a script is running on behalf of the CGI Extension NLM, and if so, redirects calls from PRINT to DOC:PRINT. Thus, Print("Hello, world") is the same as DOC:Print("Hello, world"). However, it is not possible to extend the Print API the same way as the DOC:Print API. Strings that start with a single quote must be terminated with a single quote and strings that start with a double quote must be terminated with a double quote.
Outputs:N/A
See Also:****
Example:DOC:Print("Hello, world")
Print('Hello, "world"')

Go to Table of Contents

DOC:Tag:Begin

Module:DOC.NLM
Purpose:Write an HTML tag to the document.
Syntax:DOC:Tag:Begin(<sTagname> [, <sOptionParameters>])
Description:This call is used to add an HTML tag to the document. It is useful for adding tags which do not have a corresponding DOC API pre-written to provide the functionality. In addition, it as easy way to override the default behavior of built-in DOC tags. This call is used in conjunction with DOC:Tag:Begin(), in order to terminate the current tag. sTagname specifies the tag you are defining. See HTML.H for some predefined tag names in the form "DOC_TAG_xxxx". Because the parameter is a string, it can easily be extended to include any HTML tag.
Outputs:Logical
See Also:DOC:Tag:End
Example:DOC:Tag:Begin(DOC_TAG_FONT,"size=-1")

Go to Table of Contents

DOC:Tag:End

Module:DOC.NLM
Purpose:Write an end of tag marker to the document.
Syntax:DOC:Tag:End(<sTagname>)
Description:This call is used in conjunction with DOC:Tag:Begin(), in order to terminate the current tag. sTagname specifies the tag you are ending. See HTML.H for some predefined tag names in the form "DOC_TAG_xxxx". Because the parameter is a string, it can easily be extended to include any HTML tag.
Outputs:Logical
See Also:DOC:Tag:Begin
Example:DOC:Tag:End(DOC_TAG_FONT)

Go to Table of Contents

DOC:Var

Module:DOC.NLM
Purpose:Read one or all CGI variables.
Syntax:<s|oValue> = DOC:Var([<sVariable>[, <sDefaultValue>]])
Description:Used to read the value of a CGI variable passed to the page. <sVariable> contains the name of the variable to be read. If the variable does not exist, <sValue> will be assigned <sDefaultValue>. If no parameters are passed to DOC:Var, all parameters passed to the page will be put into an object <oValue>.
Outputs:String, Object
See Also:**
AllVars=DOC:Var(); rem put all the cgi variables into an object
Name=AllVars.Auto ; rem get the CGI variable of Auto
Type=AllVars.Type ; rem get the cgi variable type
Name=DOC:Var("AUTO"); rem get the cgi variable auto
Name=DOC:Var("AUTO","MAZDA"); rem get the cgi var, if no variable is passed use mazda for default

Go to Table of Contents

End Sub

Module:NB.NLM
Purpose:Marks end of subroutine
Syntax:End Sub
Description:Marks the end of a subroutine
Outputs:None
See Also:Sub
Example:Sub Main
Print("Hello World"); Newline
End Sub

Go to Table of Contents

ENV:Get

Module:NB.NLM
Purpose:Get the environment object for a specified variable.
Syntax:<oEnvironment> = ENV:Get ([<sVariableName>])
Description:ENV:Get returns the environment object <oEnvironment> for the environment variable specified by the variable name <sVariableName>. Environment variables are shared among all programs. When the optional parameter <sVariableName> is not specified, an empty environment object is returned which can be used to create a new environment variable.
Outputs:Environment object
Attributes:[Read-Write]: Name, Data; [Read-Only] Error
See Also:ENV:Set, ENV:Print, Error! Reference source not found.
Example:EnvObj = ENV:Get("PATH")
If (EnvObj.Error = 0)
Print(EnvObj.Name, " = ", EnvObj.Data)
EndIf
EnvObj = ENV:Get("TEMP")
If (EnvObj.Error = 0)
Print(EnvObj.Name, " = ", EnvObj.Data)
EndIf

Go to Table of Contents

ENV:Print

Module:NB.NLM
Purpose:Print all environment variables.
Syntax:ENV:Print
Description:ENV:Print prints all environment variables.
See Also:
See Also:ENV:Get, ENV:Set, Environment
Example:Print("Environment variables are :")
Newline
ENV:Print

Go to Table of Contents

ENV:Set

Module:NB.NLM
Purpose:Change the environment variables according to a specified environment object.
Syntax:<oEnvironment2> = ENV:Set (<oEnvironment1>)
Description:ENV:Set changes environment variables according to the environment object <oEnvironment1>. The returned path object <oEnvironment2> contains the updated attributes for the environment object <oEnvironment1>. ENV:Set is the object manager for environment objects, and all changes to environment variables are made by this command.
Outputs:Environment object
Attributes:[Read-Write]: Name, Data; [Read-Only] Error
Note:To create a new variable, use the ENV:Get command, without a parameter, to obtain an empty environment object. Assign values to the Name and Data attributes, and supply the new object to the ENV:Set command. To delete an existing variable, use the ENV:Get command to retrieve the environment object for the variable, change the Name attribute to null, and supply the new object to the ENV:Set command.
See Also:
See Also:ENV:Get, ENV:Print, Environment
Example:EnvObj = ENV:Get
EnvObj.Name = "DAT:"
EnvObj.Data = "HITECSOFT/SYS:\DAT"
EnvObj = ENV:Set(EnvObj)
If (EnvObj.Error = 0)
Print("The new variable DAT: is created")
EndIf

Go to Table of Contents

False

Module:NB.NLM
Purpose:Representation for logical false.
Syntax:<lFalse> = False
Description:False returns the logical <lFalse> which represents the opposite of true. A condition can have a true or false state. False means the condition is not met.
Outputs:Logical
See Also:True, Appendicies
Example:Continue = False
WIN:At(20,2); WIN:Say("Do you want to continue ")
ExitKey = WIN:Get:Read
If ((!Continue) | (ExitKey = KEY_ESC))
Quit
EndIf

Go to Table of Contents

FIO:Close

Module:NB.NLM
Purpose:Close a specified file.
Syntax:FIO:Close (<hFileHandle>)
Description:FIO:Close closes the file specified by the file handle <hFileHandle>.
See Also:FIO:Open, Appendicies
Example:fHandle = FIO:Open(FileName,Mode)
FIO:Close(fHandle)

Go to Table of Contents

FIO:Eof

Module:NB.NLM
Purpose:Determine if the file pointer is positioned at the bottom of a specified file.
Syntax:<lEnd> = FIO:Eof (<hFileHandle>)
Description:FIO:Eof determines whether the file pointer is currently positioned at the bottom of the file specified by the file handle <hFileHandle>. The logical <lEnd> returned by the FIO:Eof command is true if the file pointer is positioned at the bottom of the file, and is false otherwise.
Outputs:Logical
See Also:FIO:Seek:Top, FIO:Seek:Bottom, FIO:Seek:Byte, FIO:Open, Appendicies
Example:FIO:Eof(fHandle)

Go to Table of Contents

FIO:Input:Select

Module:NB.NLM
Purpose:Determine the handle for the standard input device.
Syntax:<hHandle1> = FIO:Input:Select()
Description:FIO:Input:Select returns the handle <hHandle1> that represents the standard input device. The standard input device is usually the keyboard, however it can be changed by the Operating System. The handle returned by the FIO:Input:Select command can be supplied to the FIO:Read:... commands in order to read the data from standard input rather than a file.
Outputs:File or device handle
See Also:**
Example:iHandle = FIO:Input:Select

Go to Table of Contents

FIO:Open

Module:NB.NLM
Purpose:Open or create a specified file.
Syntax:<hFileHandle> = FIO:Open (<sFileName>, <sMode>)
Description:FIO:Open opens the file specified by the file name <sFileName> and returns the file handle <hFileHandle> that is used to access the file. If the file does not exist, FIO:Open will set the Err to -1. The string <sMode> specifies the file modes (see Appendix F- Reserved File I/O).
Outputs:File handle
Note:The FIO.H file must be included in the program in order to take advantage of the reserved mode constant names. Always check Err after FIO:Open.
See Also:xitKey = KEY_ESC))
Quit
EndIf
See Also:FIO:Close, Appendicies
Example:Mode = FIO_CREATE_WRITE+FIO_TEXT
Handle = FIO:Open("SYS:SYSTEM\MON.NCF", Mode)
If (Err !=0)
Print ("Error opening file")
End sub
EndIf
If (!FIO:Write(Handle, "LOAD MONITOR"))
Print ("Error writing to the MON.NCF file")
EndIf
FIO:Close(Handle)

Go to Table of Contents

FIO:Output:Select

Module:NB.NLM
Purpose:Select the output destination for Print and Newline commands.
Syntax:<hHandle2> = FIO:Output:Select ([<hHandle1>])
Description:FIO:Output:Select changes the output destination for Print and Newline commands to the device or file specified by the handle <hHandle1>. The standard output device is usually the display screen, however, it can be changed by the Operating System. The Print and Newline commands normally send information to the standard output device. The FIO:Output:Select command can be used to reroute the output from Print and Newline commands to a printer or a file. The FIO:Output:Select command returns the handle <hHandle2> that represents the old output device and can be supplied to the FIO:Write:... commands in order to write the data back to that output device.
Outputs:File or device handle
Note:The FIO:Output:Select command has no effect on the WIN:Say command.
See Also:Print, Error! Reference source not found., FIO:Write, FIO:Write:Byte
Example:FIO:Output:Select(iHandle)

Go to Table of Contents

FIO:Position

Module:NB.NLM
Purpose:Determine the current position of the file pointer.
Syntax:<iPosition> = FIO:Position(<hHandle>)
Description:FIO:Position returns the current file pointer position <iPosition> for the file specified by the file handle <hHandle>.
Outputs:Integer
See Also:FIO:Seek:Top, FIO:Seek:Byte, FIO:Seek:Bottom
Example:FIO:Position(iHandle)

Go to Table of Contents

FIO:Read:Byte

Module:NB.NLM
Purpose:Read a specified number of bytes from a file.
Syntax:<sBuffer> = FIO:Read:Byte (<hFileHandle>, [<iBytes>])
Description:FIO:Read:Byte reads as many bytes as specified by the integer <iBytes> from the current file pointer position of the file specified by the file handle <hFileHandle> and returns it as the string <sBuffer>. The file pointer is advanced forward. When the optional parameter <iBytes> is not specified, one byte is read.
Outputs:String
Note:Since the string <sBuffer> may include null characters, the STR:...commands may not manipulate this string properly. The STR:Length command, however, does return the correct length for such strings.
See Also:FIO:Read:String, FIO:Read:Integer, FIO:Read:Real
Example:fHandle = FIO:Open(FileName,Mode)
Szbuf = FIO:Read:Byte(fHandle, 100)
FIO:Close(fHandle)

Go to Table of Contents

FIO:Read:Integer

Module:NB.NLM
Purpose:Read one integer from a specified file.
Syntax:<iInteger> = FIO:Read:Integer ([<hFileHandle>])
Description:FIO:Read:Integer reads one integer from the current file pointer position of the file specified by the file handle <hFileHandle> and returns it as the integer <iInteger>. The file pointer is advanced forward. When the optional parameter <hFileHandle> is not specified, the FIO:Read:Integer command reads the data from the standard input device.
Outputs:Integer
See Also:FIO:Read:Real, FIO:Read:Byte, FIO:Read:String
Example:fHandle = FIO:Open(FileName,Mode)
Number = FIO:Read:Integer(fHandle)
FIO:Close(fHandle)

Go to Table of Contents

FIO:Read:Real

Module:NB.NLM
Purpose:Read one real number from a specified file.
Syntax:<rReal> = FIO:Read:Real ([<hFileHandle>])
Description:FIO:Read:Real reads one real number from the current file pointer position of the file specified by the file handle <hFileHandle> and returns it as the real number <rReal>. The file pointer is advanced forward. When the optional parameter <hFileHandle> is not specified, the FIO:Read:Real command reads the data from the standard input device.
Outputs:Real
See Also:FIO:Read:Integer, FIO:Read:Byte, FIO:Read:String
Example:fHandle = FIO:Open(FileName,Mode)
Number = FIO:Read:Real(fHandle)
FIO:Close(fHandle)

Go to Table of Contents

FIO:Read:String

Module:NB.NLM
Purpose:Read one string from a specified file.
Syntax:<sString> = FIO:Read:String ([<hFileHandle>])
Description:FIO:Read:String reads one string from the current file pointer position of the file specified by the file handle <hFileHandle> and returns it as the string <sString>. The data is read until a null character, carriage return or the end of file is encountered. The file pointer is advanced forward. When the optional parameter <hFileHandle> is not specified, the FIO:Read:String command reads the data from the standard input device.
Outputs:String
See Also:FIO:Read:Byte, FIO:Read:Integer, FIO:Read:Real, Appendicies
Example:fHandle = FIO:Open(FileName,Mode)
Szbuf = FIO:Read:String(fHandle)
FIO:Close(fHandle)

Go to Table of Contents

FIO:Seek:Bottom

Module:NB.NLM
Purpose:Move the file pointer backward from the bottom of the file.
Syntax:<lMoved> = FIO:Seek:Bottom (<hFileHandle>, [<iBytes>])
Description:FIO:Seek:Bottom moves the file pointer of the file specified by the file handle <hFileHandle>. The file pointer is moved backward, from the bottom of the file, by the number of bytes that are specified by the integer <iBytes>. When the optional parameter <iBytes> is not specified, the file pointer is moved to the end of the file. The returned logical <lMoved> is true when the file pointer is properly moved, and is false otherwise.
Outputs:Logical
Note:The parameter <iBytes> can be supplied as either a positive or negative number.
See Also:FIO:Seek:Top, FIO:Seek:Byte
Example:fHandle = FIO:Open(FileName,Mode)
FIO:Seek:Bottom(fHandle, 100)

Go to Table of Contents

FIO:Seek:Byte

Module:NB.NLM
Purpose:Move the file pointer forward or backward from the current position.
Syntax:<lMoved> = FIO:Seek:Byte (<hFileHandle>, <iBytes>)
Description:FIO:Seek:Byte moves the file pointer of the file specified by the file handle <hFileHandle>. The file pointer is moved forward or backward, from the current file pointer position, by the number of bytes specified by the integer <iBytes>. When the integer <iBytes> is positive, the file pointer is moved forward. When the integer <iBytes> is negative, the file pointer is moved backward. The returned logical <lMoved> is true when the file pointer is properly moved, and is false otherwise.
Outputs:Logical
See Also:FIO:Seek:Top, FIO:Seek:Bottom
Example:fHandle = FIO:Open(FileName,Mode)
FIO:Seek:Byte(fHandle, 100)

Go to Table of Contents

FIO:Seek:Top

Module:NB.NLM
Purpose:Move the file pointer forward from the top of the file.
Syntax:<lMoved> = FIO:Seek:Top (<hFileHandle>, [<iBytes>])
Description:FIO:Seek:Top moves the file pointer of the file specified by the file handle <hFileHandle>. The file pointer is moved forward, from the top of the file, by the number of bytes that are specified by the integer <iBytes>. When the optional parameter <iBytes> is not specified, the file pointer is moved to the top of the file. The returned logical <lMoved> is true when the file pointer is properly moved, and is false otherwise.
Outputs:Logical
Note:The parameter <iBytes> must be greater than zero.
See Also:FIO:Seek:Bottom, FIO:Seek:Byte
Example:fHandle = FIO:Open(FileName,Mode)
FIO:Seek:Top(fHandle, 100)

Go to Table of Contents

FIO:Write

Module:NB.NLM
Purpose:Write some specified data to a file.
Syntax:<lSuccess> = FIO:Write ([<hFileHandle>], Data1>[,<xData2>[,...]])
Description:FIO:Write writes data to the file specified by the file handle <hFileHandle>. Multiple parameters are separated by commas. The data can be of any type, but cannot contain any null characters or carriage returns when it is a string. The returned logical <lSuccess> is true when the data is properly written, and is false otherwise. When the returned logical is false, the Err command returns a number which may be used to identify the cause of the failure. When the optional parameter <hFileHandle> is not specified, the FIO:Write command writes the data to the standard output device. The default standard output device is the screen.
Outputs:Logical
See Also:SYS:Error:Number
Example:fHandle = FIO:Open(FileName,Mode)
FIO:Write(fHandle, "TestString1","TestString2")

Go to Table of Contents

FIO:Write:Byte

Module:NB.NLM
Purpose:Write a specified number of bytes to a file.
Syntax:<lSuccess> = FIO:Write:Byte (<hFileHandle>, <sBuffer>, [<iBytes>])
Description:FIO:Write:Byte writes as many bytes as specified by the integer <iBytes> from the string buffer <sBuffer> to the file specified by the file handle <hFileHandle>. When the optional parameter <iBytes> is not supplied, the entire buffer <sBuffer> is written. The returned logical <lSuccess> is true when the data is properly written, and is false otherwise.When the returned logical is false, the Err command returns a number which may be used to identify the cause of the failure.
Outputs:String
Note:The string <sBuffer> can include null characters or carriage returns.
See Also:**
Example:fHandle = FIO:Open(FileName,Mode)
FIO:Write:Byte(fHandle,"TestString",5)

Go to Table of Contents

Function

Module:NB.NLM
Purpose:Start a user definable function.
Syntax:Function <sName>
Description:Function identifies the start of a user definable function. Functions are used by programmers to create reusable codes. All functions are terminated by the Return command. The Return command always returns a value to the calling program. (When the Return command is used without parameter, it returns a null.) Both the Function and Sub commands are used interchangeably and are executed in the same manner. The string <sName> is the name for the user defined function. Function can be abbreviated as Func.
Note:The main function that should be executed upon the start of the application should be named "Main".
See Also:Return, Sub
Example:See: example for the LOCAL command

Go to Table of Contents

INI:Read

Module:INI.NLM
Purpose:Retrieve a character string from a specified section and entry in the specified initialization file.
Syntax:<sBuffer> = INI:Read (<sFileSpec>,<sSection>,<sEntry>,<sDefault>)
Description:The function searches the file <sFileSpec> for entry <sEntry> under the section <sSection>. If the entry is found, its corresponding string is copied to the buffer. If it does not exist, the default character string specified by <sDefault> is returned. A string entry in the initialization file must have the following form:

[Section]
Entry = String
.
.

If <sFileSpec> does not contain a fully qualified path the current directory is assumed. If the corresponding string for <sEntry> is empty, INI:Read returns an empty string.
Outputs:String
See Also:INI:Write
Example:Sub Main
INI:Write("SYS:DELME.INI","APP","KEY1","VALUE1")
INI:Write("SYS:DELME.INI","APP","KEY2","VALUE2")
Print(INI:READ("SYS:DELME.INI","APP","KEY1","DEFAULT1")); Newline
Print (INI:READ("SYS:DELME.INI","APP","KEY3","TEST-DEFAULT1")); Newline
Print (INI:READ("SYS:DELME.INI","APP","KEY3","TEST-DEFAULT2")); Newline
Print (INI:READ ("SYS:DELME.INI","APP","KEY2","DEFAULT2")); Newline
End sub

Go to Table of Contents

INI:Write

Module:INI.NLM
Purpose:Copy a string into a specified section of the specified initialization file.
Syntax:<lSuccess> = INI:Write (<sFileSpec>,<sSection>,<sEntry>,<sBuffer>)
Description:Write <sBuffer> to entry <sEntry> in file <sFileSpec> under section <sSection>. Sections in the initialization file have the following form:

[Section]
Entry = String

.
.

If <sFileSpec> does not contain a fully qualified path the current directory is assumed. If <sFileSpec> contains a fully qualified path and filename and the file does not exist, INI:Write creates the file.
Outputs:Logical
See Also:INI:Read
Example:Sub Main
INI:Write("SYS:DELME.INI","APP","KEY1","VALUE1")
INI:Write("SYS:DELME.INI","APP","KEY2","VALUE2")
Print(INI:READ("SYS:DELME.INI","APP","KEY1","DEFAULT1")); Newline
Print (INI:READ ("SYS:DELME.INI","APP","KEY3","TEST-DEFAULT1")); Newline
Print(INI:READ("SYS:DELME.INI","APP","KEY3","TEST-DEFAULT2")); Newline
Print(INI:READ("SYS:DELME.INI","APP","KEY2","DEFAULT2")); Newline
End sub

Go to Table of Contents

KEY:Last

Module:NB.NLM
Purpose:Determine the last key processed.
Syntax:<iKey> = KEY:Last
Description:KEY:Last returns the integer <iKey> that represents the last key processed.
Outputs:Integer
Note:KEY.H must be included in the program in order to take advantage of the reserved key names.
See Also:KEY:Read, KEY:Ready, Appendicies
Example:WIN:Popup("Press Esc to abort"); Newline
If (KEY:Last = KEY_ESC)
Quit
EndIf
Print("Continue with the program")
Key:Read

Go to Table of Contents

KEY:Read

Module:NB.NLM
Purpose:Read a key input from the keyboard.
Syntax:<iKey> = KEY:Read
Description:KEY:Read reads a key input from the keyboard. When the keyboard buffer is not empty, the first key in the buffer is read. When the buffer is empty, the KEY:Read command waits until a key is pressed. The KEY:Read command returns the integer <iKey> that represents the key read.
Outputs:Integer
Note:KEY.H must be included in the program in order to take advantage of the reserved key names.
See Also:KEY:Write, KEY:Ready, ,"DEFAULT2")); Newline
End sub
See Also:KEY:Last, WIN:Get, Appendicies
Example:Print("Press Esc to abort"); Newline
Print("Press any other key to continue"); Newline
KeyPressed = KEY:Read
If (KeyPressed = KEY_ESC)
Print("Aborting"); Quit
Endif
Print("Program is continued")

Go to Table of Contents

KEY:Ready

Module:NB.NLM
Purpose:Determine if any keys exist in the keyboard buffer.
Syntax:<lKey> = KEY:Ready
Description:KEY:Ready determines if any keys exist in the keyboard buffer. When keys are input faster than they are processed, the keys are stored in the keyboard buffer. The returned logical <iKey> is true when at least one key exists in the keyboard buffer, and is false otherwise.
Outputs:Logical
See Also:KEY:Write, Appendicies
Example:Do While (KEY:Ready)
KEY:Read
EndDo
Print("All the keys are removed from the buffer")

Go to Table of Contents

KEY:Write

Module:NB.NLM
Purpose:Stuff a series of keys into the keyboard buffer.
Syntax:KEY:Write (<sKeys>, [<sScreenName>])
Description:KEY:Write stuffs all the keys specified by the string <sKeys> into the keyboard buffer as if all of those keys were pressed by the user. The optional case-sensitive parameter <sScreenName> is only used for NLMs and allows the keys to be stuffed into any NLM's screen. If screen name is not given, the keys will be stuffed in the current screen.
Outputs:This function returns True if the NLM was found and keys were sent, or False otherwise.
See Also:KEY:Ready, KEY:Read
Example:CR = DATA:CHR(13)
KEY:Write("LOAD SBACKUP"+CR,"System Console")
Print("SBACKUP.NLM is loaded")

Go to Table of Contents

Local

Module:NB.NLM
Purpose:Define a local variable within a function or a subroutine.
Purpose:Local (<sVariable1> [,<sVariable2> [,...]])
Description:Local defines a local variable within a function or a subroutine. Local variables are only accessible inside the current function or subroutine. Any variable that is not defined as local is considered to be global and can be accessed anywhere throughout the program.
Note:The variable name must be enclosed in quotation marks.
See Also:Appendicies
Example:Print("The hour is ", AMPM); Newline

Function AMPM
Local("DateObj","HourInt","Hour")
Hour = ""
DateObj = NET:Server:Date:Get
If (Date.Error = 0)
HourInt=DATA:Integer(STR:Sub(DateObj.Time,1,2))
If (HourInt >= 13)
Hour = Data:String(HourInt-12)) + " PM"
Else
Hour = Data:String(HourInt)) + " AM")
EndIf
EndIf
Return(Hour)

Go to Table of Contents

MATH:Abs

Module:NB.NLM
Purpose:Determine the absolute value of a number.
Syntax:<i|rAbsolute> = MATH:Abs (<i|rNumber>)
Description:MATH:Abs returns the integer or real number <i|rAbsolute> that represents the absolute value of the number <i|rNumber>. The parameter <i|rNumber> can be of type integer or real, and the returned value <i|rAbsolute> has the same type as the supplied parameter.
Outputs:Integer or real
See Also:**
Example:Print(MATH:Abs(-2.15), " ",MATH:Abs(-5))

Go to Table of Contents

MATH:Atan

Module:NB.NLM
Purpose:Determine the arctangent of a number.
Syntax:<rAngle> = MATH:Atan (<i|rNumber>)
Description:MATH:Atan returns the angle <rAngle> that represents the arctangent of the number <i|rNumber>. The number <i|rNumber> can be of type integer or real. The angle <rAngle> is type real and is measured in radians.
Outputs:Real
See Also:**
Example:Print(MATH:Atan(MATH:Pi))

Go to Table of Contents

MATH:Cos

Module:NB.NLM
Purpose:Determine the cosine of an angle.
Syntax:<rCosine> = MATH:Cos (<i|rAngle>)
Description:MATH:Cos returns the real number <rCosine> that represents the cosine of the angle <i|rAngle>. The angle <i|rAngle> can be of type integer or real and is measured in radians.
Outputs:Real.
See Also:**
Example:Print(MATH:Cos(MATH:Pi))

Go to Table of Contents

MATH:Exp

Module:NB.NLM
Purpose:Determine the value of the mathematical number "e" (approximately 2.71828) raised to a specified power.
Syntax:<rExponential> = MATH:Exp (<i|rPower>)
Description:MATH:Exp returns the real number <rExponential> that represents the Euler mathematical number "e" (approximately 2.71828), raised to the power <i|rPower>. The parameter <i|rPower> can be of type integer or real.
Outputs:Real
See Also:**
Example:Print("e to the power 2 is ",MATH:Exp(2))

Go to Table of Contents

MATH:Log

Module:NB.NLM
Purpose:Determine the natural logarithm of a number.
Syntax:<rNaturalLog> = MATH:Log (<i|rNumber>)
Description:MATH:Log returns the real number <rNaturalLog> that represents the natural logarithm (base e) of the number <i|rNumber>. The parameter <i|rNumber> can be of type integer or real and must be greater than zero.
Outputs:Real
Note:MATH:Log returns the exponent X in the equation eX = Y.
See Also:**
Example:Print("The natural log of 3 is ",MATH:Log(3))

Go to Table of Contents

MATH:Mod

Module:NB.NLM
Purpose:Determine the remainder of a division operation.
Syntax:<iRemainder> = MATH:Mod (<iDividend>, <iDivisor>)
Description:Return the integer <iRemainder> representing the remainder of the integer <iDividend>, divided by the integer <iDivisor>. The parameter <iDivisor> must be greater than zero.
Outputs:Integer
See Also:Appendicies
Example:Print("When dividing 14 by 6, the remainder is ")
Print(MATH:Mod(14,6)); Newline

Go to Table of Contents

MATH:Pi

Module:NB.NLM
Purpose:Return the numeric constant Pi (approximately 3.14159).
Syntax:<rPi> = MATH:Pi
Description:MATH:Pi returns the numeric constant Pi (Approx. 3.14159).
Note:pi is the ratio of the circumference of a circle to its diameter.
Outputs:Real
See Also:**
Example:Print("The value of pi is ",MATH:Pi)

Go to Table of Contents

MATH:Random

Module:NB.NLM
Purpose:Generate a random number.
Syntax:<iRandom> = MATH:Random
Description:MATH:Random returns the integer <iRandom> that represents a random number between zero and 32767.
Outputs:Integer
See Also:**
Example:'Random numbers from 0 to 100
Do While (True)
Print((Math:Random * 100)/32767); Newline
If (Key:Ready); Exit; Endif
EndDo

Go to Table of Contents

MATH:Sin

Module:NB.NLM
Purpose:Determine the sine of an angle.
Syntax:<rSine> = MATH:Sin (<i|rAngle>)
Description:MATH:Sin returns the real number <rSine> that represents the sine of the angle <i|rAngle>. The angle <i|rAngle> can be of type integer or real and is measured in radians.
Outputs:Real
See Also:**
Example:Print(MATH:Sin(MATH:Pi))

Go to Table of Contents

MATH:Sqr

Module:NB.NLM
Purpose:Determine the squared value of a number.
Syntax:<i|rSquare> = MATH:Sqr (<i|rNumber)
Description:MATH:Sqr returns the integer or real number <i|rSquare> that represents the squared value of the number <i|rNumber>. The parameter <i|rNumber> can be of type integer or real, and the returned value <i|rSquare> has the same type as the supplied parameter.
Outputs:Integer or Real
Note:MATH:Sqr returns the value of X in the equation X = Y2.
See Also:**
Example:Print("14 to the power of 2 is ",MATH:Sqr(14))

Go to Table of Contents

MATH:Sqrt

Module:NB.NLM
Purpose:Determine the square root of a number.
Syntax:<rSquareRoot> = MATH:Sqrt (<i|rNumber)
Description:MATH:Sqrt returns the real number <rSquareRoot> that represents the square root for the number <i|rNumber>. The parameter <i|rNumber> can be of type integer or real and must be greater than or equal to zero.
Outputs:Real
See Also:**
Example:Print("The square root of 81 is ",MATH:Sqrt(81))

Go to Table of Contents