| Previous | Contents | Index |
SKIP returns the position of the character following the last skipped character.
str_expr1 is the text string to be searched.
str_expr2 contains the list of characters which are to be skipped. If only one argument is given, SKIP will skip over spaces, tabs and nulls.
int_expr contains the search start position. This parameter is optional.
10 a$ = '31415 hello'
z = SKIP(a$, '1234567890 ')
20 PRINT mid(a$, z)
30 END
RNH
Hello
|
Sorts the elements from a str_expr1 in ASCII value order. Returns a list of the sorted elements.
str_expr1 contains the list of elements to be sorted.
str_expr2 is an optional separator. Default is a comma.
10 a$ = 'code area is'
a_sort$ = SORT$(a$, ' ')
PRINT a_sort$
20 END
RNH
area code is
|
Returns the number of spaces indicated by num_expr.
SQR returns the square root of a number.
STR$ changes a number to a numeric string. The string that is created does not have any extra leading or trailing spaces.
?8pc
or
SYSTEXT$ returns the text associated with the operating system status specified. If no int_expr is supplied, INTOUCH returns the text for the last system status.
When used with the PRINT statement, the TAB function moves the cursor or print mechanism to the right to a specified column.
TAN returns the tangent of an angle that is specified in radians.
Returns the hyperbolic tangent of the numeric expression given.
The value returned by the TIME function depends on the value of int_expr.
If int_expr = 0, TIME returns the number of seconds since midnight.
If int_expr = 1, TIME returns the CPU time of the process in tenths of a second.
If int_expr = 2, TIME returns connect time of the current process in minutes.
?8pc
or
If num_expr is NOT specified, TIME$ returns the current time of day in HH:MM:SS format.
num_expr is the number of seconds since midnight. The result is returned in HH:MM format.
10 PRINT TIME$(1800)
PRINT TIME$(54178)
20 END
RNH
00:30
15:02
|
Returns the number of seconds since INTOUCH was invoked. This function can be used to time events to the nearest 100th/sec.
Returns the string specified stripped of any leading or trailing spaces and tabs.
10 LET a$ = ' HELLO '
20 PRINT '*'; a$; '*'
30 LET stripped$ = TRIM$(a$)
40 PRINT '*'; stripped$; '*'
RNH
* HELLO *
*HELLO*
|
Returns the constant 1. It is returned as an integer.
Truncates a real number to a given number of decimal places.
Given an array and a dimension number, returns the upper bound for that dimension. It returns an integer value. The default dimension is 1.
UCASE returns a string expression with all letters in upper case.
The UNQUOTE$ function removes one set of quotes from a quoted string expression. If the string expression is not quoted, UNQUOTE$ leaves the string alone. UNQUOTE$ does not affect internally quoted elements.
10 DO
CLEAR
PRINT AT 1,1:
MESSAGE 'Enter a line of text to be unquoted'
PRINT 'Text:'
INPUT '', LENGTH 50: line$
IF _BACK OR _EXIT THEN EXIT DO
IF line$ = '' THEN REPEAT DO
20 PRINT
PRINT 'Quotes removed using the UNQUOTE$ function...'
PRINT UNQUOTE$(line$)
DELAY
LOOP
100 END
RNH
Text:
? "I will not take these 'things' for granted"
Quotes removed using the UNQUOTE$ function...
I will not take these 'things' for granted
|
VAL returns the floating-point value of a numeric string.
VALID is used to validate user responses.
text_str is the text to be validated.
rule_str is the list of validation rules.
Multiple validation rules are separated by a semi-colon. If given characters are NOT between quotes, they are upper-cased.
VALID returns an error if there is an invalid validation rule.
'Illegal validation rule' (-4021)
|
VALID returns TRUE or FALSE according to the following validation rules:
10 IF VALID('ann', 'ALLOW ann, dan, tom') THEN PRINT 'true'
20 IF NOT VALID('10', 'NUMBER; ALLOW 1 to 6; MAXLENGTH 2') &
THEN PRINT 'false'
30 IF VALID('12', 'NUMBER; ALLOW 1 TO 24,99') THEN PRINT 'true'
40 END
RNH
true
false
true
|
10 IF VALID('10', 'DISALLOW 01,03,05; MINLENGTH 2') &
THEN PRINT 'true'
20 END
RNH
true
|
| DATE | YMD | YYMMDD format | |
| DATE | DMY | DDMMYY format | |
| DATE | MDY | MMDDYY format | |
| DATE | MDCY | MMDDCCYY format |
For all dates, use 'LENGTH nn' to control whether a 6- or 8-character date is required. |
10 PRINT VALID('01-May-93', 'DATE DMONY')
20 END
RNH
1
|
10 PRINT VALID('01-May-1993', 'DATE DMONCY')
20 END
RNH
1
|
10 PRINT VALID('19931231 010101', 'FULLTIME')
PRINT VALID('931231 010101', 'FULLTIME')
20 END
RNH
1
1
|
10 PRINT VALID('integer', 'vrules')
20 END
RNH
1
|
10 text_str$ = '##.##'
PRINT VALID(text_str$, 'PRINTMASK')
20 END
RNH
1
|
10 text_str$ = 'total = a% + 30'
PRINT VALID(text_str$, 'EXPRESSION')
PRINT VALID('##~-###', 'EXPRESSION')
20 END
RNH
1
0
|
10 a$ = 'PRINT 'Hello, ' name$'
IF NOT VALID(a$, 'CODE') THEN PRINT 'false'
30 END
|
10 text_str$ = '%multi,a,b,c'
PRINT VALID(text_str$, 'MENU')
20 END
RNH
1
|
10 PRINT VALID('do_totals', 'ROUTINE')
PRINT VALID('test_nos', 'ROUTINE')
20 END
100 ROUTINE do_totals: PRIVATE mytotal, desc$
mytotal = 15
desc$ = 'Test Totals'
PRINT desc$; mytotal
END ROUTINE
RNH
1
0
|
old_t1=new_t1, old_t2=new_t2, ....
|
10 IF VALID('abcd10', &
'FILTER REMOVE "10"; LETTERS' THEN PRINT 'true'
IF VALID("ab1cd1", "FILTER REPLACE '1'='e';LETTERS") &
THEN PRINT 'true'
IF VALID(" 1234 ","FILTER TRIM; NUMBER") &
THEN PRINT 'true'
30 END
RNH
true
true
true
|
10 IF VALID("123", &
"FILTER REPLACE '1'='a';RESTORE;NUMBER") &
THEN PRINT "true"
20 END
RNH
true
|
Returns a word-wrapped text string, given left and right margins. Each line of the string is separated with a CR/LF.
Where string_expr = text string to wrap, int_expr1 = left margin, int_expr2 = right margin.
The XLATE$ function translates one string to another by referencing a table you supply. For example, the XLATE$ function can translate from EBCDIC to ASCII. The first str_expr is the string to be translated. The second str_expr is the translation table.
Reserved words are words that cannot be used as identifiers. INTOUCH's reserved words are:
The following words will be reserved in future versions:
Errors are returned either immediately after typing a syntactically incorrect line, or when the RUN command is given and your program is syntactically incorrect.
| Previous | Next | Contents | Index |