See FOR...NEXT.
Supported On | UX WS DOS IN |
Option Required | None |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
NOT returns 1 if its argument equals 0. Otherwise, 0 is returned.
Invert_flag=NOT Std_device
IF NOT My_job THEN Sleep
When evaluating the argument, a non-zero value (positive or negative) is treated as a logical 1; only zero is treated as a logical 0. Complex values are not allowed.
The logical complement is shown below:
A | NOT A |
---|---|
0 | 1 |
1 | 0 |
Supported On | UX WS DOS |
Option Required | None |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
NPAR returns the number of parameters passed to the current subprogram. If execution is currently in the main program, NPAR returns 0.
IF NPAR>3 THEN Extra
Factors=NPAR-2
Supported On | UX WS DOS IN |
Option Required | None |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
NUM returns the decimal value of the ASCII character code of the first byte in the specified string. The range of returned values is 0 through 255.
Ascii_val=NUM(String$)
A$[I;1]=CHR$(NUM(A$[I])+32)
Item | Description | Range |
---|---|---|
argument | string expression | not a null string |
Certain localized versions of HP BASIC, such as Japanese localized HP BASIC, support two-byte characters. NUM handles two-byte characters one byte at a time, not one character at a time. You must use substrings to identify each byte of a two-byte character. For more information about two-byte characters, see the globalization chapters of HP BASIC Porting and Globalization.