Download the PDF documentation - True BASIC

truebasic.com

Download the PDF documentation - True BASIC

1

True BASIC Language System

String Handling Libraries

In addition to the strings functions included in True BASIC, additional tools are provided in the library

STRLIB.TRC. All of the string functions and subroutines are described below in alphabetical order.

The operations provided by these functions and subroutines include:

Return sets of string constants

ALPHANUM$, CONTROL$, DIGITS$, LETTERS$, LOWER$, PUNCT$,

RNDSTR$, UPPER$

Return simple parts of strings

LEFT$, MID$, RIGHT$

Return date and time strings:

NICEDATE$, NICETIME$, NOW$, SHORTDATE$, TODAY, WEEKDAY,

WEEKDAY$

Convert between numeric and other representations of numbers:

DOLLARS$, DOLLARVAL, ENGLISHNUM$, EVAL, LVAL, ROMAN$,

SUPERVAL

Parse a string BREAKUP, EXPLODE, EXPLODEN, NEXTWORD

Trim extra spaces INTRIM$, LTRIM$, RTRIM$, TRIM$, JUSTIFY$, NOSPACE$

Format text CENTER$, FILLARRAY, FILLFROM, HEADER$, JUSTIFY$, JUSTIFYARRAY,

JUSTIFYFROM, LJUST$, RJUST$

Reverse a string REVERSE$

Find shared or non-shared characters in two strings

CHARDIFF$, CHARINT$, CHARS$, CHARUNION$, UNIQ$

Remove or replace characters from strings

DELCHAR$, DELMIX$, DELSTR$, KEEPCHAR$, MAPCHAR$, NPLUGCHAR$,

NREPCHAR$, PLUGCHAR$, PLUGMIX$, PLUGSTR$, REPCHAR$, REPMIX$,

REPSTR$

ALPHANUM$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

BREAKUP Subroutine

Library:

Syntax:

Usage:

Summary:

STRLIB.TRC

ALPHANUM$

LET set$ = ALPHANUM$

Returns the set of alphabetic and digit characters.

The ALPHANUM$ function returns a string containing the set of characters representing

the letters of the alphabet, both uppercase and lowercase, as well as the digits, arranged in

ascending order according to their ASCII codes. (For a table of the ASCII codes and their

corresponding characters, see Appendix A.)

That is, it returns the equivalent of the string constant:

“0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz”

None.

None

DIGITS$, LETTERS$, UPPER$, LOWER$, PUNCT$, CONTROL$

STRLIB.TRC

CALL BREAKUP (strex, strex, strex)

CALL BREAKUP (phrase$, word$, delims$)

Returns the next word, as delineated by a delimiter character, from the specified phrase.


String Handling Libraries 2

Details:

Example:

Exceptions:

See also:

The BREAKUP subroutine returns the next “word” from the specified “phrase.”

A phrase is defined as any series of characters, and a word is defined as any series of

characters except those defined as delimiters.

When invoking the BREAKUP subroutine, you pass the phrase as phrase$ and the

characters to be defined as delimiters as delims$. The subroutine then examines the

phrase, looking for the first delimiter character, and returns the characters up to but not

including this delimiter as the value of word$. It also updates the value of phrase$ to

eliminate the returned word and the delimiter.

Note that the BREAKUP subroutine strips any leading and trailing spaces off of the return

values of word$ and phrase$.

For example, assume you have passed delim$ with a value of “*#;” and phrase$ with a

value of “***abc***def**” to the BREAKUP subroutine. The subroutine would return

word$ with a value of the null string and phrase$ with a new value of “**abc***def**”

since there is no non-delimiter value between the beginning of the phrase and the first

delimiter. The process of breaking a phrase into words is often referred to as parsing a

phrase.

If the value of phrase$ does not contain any delimiters, the BREAKUP subroutine will

return the value of phrase$ in word$ and return phrase$ equal to the null string.

Note that the BREAKUP subroutine is closely related to, but subtly different from, the

NEXTWORD subroutine. The BREAKUP subroutine treats each individual delimiter

character as a delimiter in its own right, while the NEXTWORD subroutine treats a series

of contiguous delimiter characters as a single delimiter. For some applications you will want

to use the BREAKUP subroutine, for others you will want to use the NEXTWORD

subroutine.

The following program:

LIBRARY "StrLib.trc"

LET s$ = "Now is the time for all good men"

DO

CALL BreakUp (s$, word$, " ")

IF word$ = "" then EXIT DO

PRINT word$,

LOOP

END

produces the following output:

all good men

Now is the time for

None

NEXTWORD, EXPLODE, EXPLODEN

CENTER$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

CENTER$ (strex, numex, strex)

LET a$ = CENTER$ (text$, width, back$)

Returns a string of the specified length containing the value of text$ center-justified.

The CENTER$ function takes the value of text$ and adds characters alternately to the

beginning and end of it as necessary to create a string containing width characters with the

value of text$ centered within it. The characters added will be determined by repeating

the sequence of characters specified by the value of back$.

Note that if the value of text$ cannot be perfectly centered within the result, the extra


3

True BASIC Language System

space will appear to the left of the value of text$ within the resulting string.

If the length of text$ is greater than the value specified by width, the CENTER$

function returns the value of text$ truncated to width characters. If the value of width is

less than or equal to 0, the CENTER$ function returns the null string.

The background pattern added to the beginning and end of the value of text$ will be

formed in such a way that all strings formed with the same value of back$ will have

identical background patterns, regardless of the value of text$. If the value of back$ is

the null string or a space, the background pattern will consist solely of blanks, or spaces.

Example: The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Center$

LET s$ = "Hello, out there"

FOR w = 20 to 25

LET t$ = Center$ (s$, w, "*")

PRINT t$

NEXT w

END

produces the following output:

**Hello, out there**

**Hello, out there***

***Hello, out there***

***Hello, out there****

****Hello, out there****

****Hello, out there*****

Exceptions: None

See also: LJUST$, RJUST$, JUSTIFY$, HEADER$. FILLARRAY, FILLFROM,

JUSTIFYARRAY, JUSTIFYFROM

CHARDIFF$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

STRLIB.TRC

CHARDIFF$ (strex, strex)

LET difference$ = CHARDIFF$ (a$, b$)

Returns the set of characters contained within the value of a$ and not within the value of

b$.

The CHARDIFF$ function returns a string containing the difference of the sets of

characters represented by the values of its arguments a$ and b$.

That is, the CHARDIFF$ function returns a string which contains one of each character

which appears in the value of its argument a$ but not within the value of its argument b$.

The characters will be organized within the resulting string in ascending order by their

ASCII codes. Thus, uppercase letters will be listed before all lowercase letters.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF CharDiff$

LET a$ = "Hello, out there"

LET b$ = "aeiouy"

PRINT "*"; CharDiff$ (a$, b$); "*"

END

produces the following output:

* ,Hhlrt*

None

CHARUNION$, CHARINT$, CHARS$, UNIQ$


String Handling Libraries 4

CHARINT$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

CHARS$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

STRLIB.TRC

CHARINT$ (strex, strex)

LET intersection$ = CHARINT$ (a$, b$)

Returns the set of characters contained within the values of both a$ and b$.

The CHARINT$ function returns a string containing the intersection of the sets of

characters represented by the values of its arguments a$ and b$.

That is, the CHARINT$ function returns a string which contains one of each character

which appears in the values of both its arguments. The characters will be organized within

the resulting string in ascending order by their ASCII codes. Thus, uppercase letters will be

listed before all lowercase letters.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF CharInt$

LET a$ = "Hello, out there"

LET b$ = "aeiouy"

PRINT "*"; CharInt$ (a$, b$); "*"

END

produces the following output:

*eou*

None

CHARUNION$, CHARDIFF$, CHARS$, UNIQ$

STRLIB.TRC

CHARS$ (numex, numex)

LET set$ = CHARS$ (start, end)

Returns the set of characters whose ASCII codes range from the value of start to the value

of end.

The CHARS$ function returns a string containing the set of characters whose ASCII codes

range in value from start to end.

If the value of start is less than or equal to the value of end, then the characters within

the resulting string will be arranged in ascending order by ASCII codes. If the value of

start is greater than the value of end, the resulting string will be arranged in descending

order.

If either start or end has a value less than 0, a value of 0 will be used instead. Likewise, if

either has a value greater than 255, a value of 255 will be used instead.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Chars$

PRINT Chars$ (33, 47)

END

produces the following output:

!"#$%&'()*+,-./

None

CHARINT$, CHARDIFF$, CHARUNION$, UNIQ$


5

True BASIC Language System

CHARUNION$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

CONTROL$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

DELCHAR$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

CHARUNION$ (strex, strex)

LET union$ = CHARUNION$ (a$, b$)

Returns the set of characters contained within the values of either a$ or b$.

The CHARUNION$ function returns a string containing the union of the sets of characters

represented by the values of its arguments a$ and b$.

That is, the CHARUNION$ function returns a string which contains one of each character

which appears in the value of either of its arguments. The characters will be organized

within the resulting string in ascending order by their ASCII codes. Thus, uppercase letters

will be listed before all lowercase letters.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF CharUnion$

LET a$ = "Now is the time"

LET b$ = "for all good men"

PRINT CharUnion$ (a$, b$)

END

produces the following output:

Nadefghilmnorstw

(Note: there is a space before the 'N'.)

None

CHARINT$, CHARDIFF$, CHARS$, UNIQ$

STRLIB.TRC

CONTROL$

LET set$ = CONTROL$

Returns the set of control characters.

The CONTROL$ function returns a string containing the set of control characters,

arranged in ascending order according to their ASCII codes. (For a table of the ASCII codes

and their corresponding characters, see Appendix A.)

That is, it returns a string composed of those characters with ASCII codes between 0 and 31,

inclusive.

None.

None

DIGITS$, LETTERS$, ALPHANUM$, UPPER$, LOWER$, PUNCT$

STRLIB.TRC

DELCHAR$ (strex, strex)

LET a$ = DELCHAR$ (text$, oldchars$)

Returns the value of text$ with all characters appearing in oldchars$ removed.

The DELCHAR$ function removes from text$ all characters which are members of the

character set represented by the value of oldchars$. That is, it returns the value of

text$ after having deleted any occurrences of characters appearing in the value of

oldchars$.


String Handling Libraries 6

Example:

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF CharDiff$, Control$, DelChar$

OPEN #1: NAME “InFile”, ORG BYTE

OPEN #2: NAME “OutFile”, ORG BYTE, CREATE NEW

ERASE #2

LET crlf$ = Chr$(13) & Chr$(10)

LET bad$ = CharDiff$(Control$, crlf$)

DO WHILE MORE #1

READ #1, BYTES 10000: block$

WRITE #2: DelChar$(block$, bad$)

LOOP

Exceptions:

See also:

END

removes all control characters except carriage return and line feed from the file named

INFILE, and stores the results in a file named OUTFILE.

None

KEEPCHAR$, REPCHAR$, NREPCHAR$, MAPCHAR$, PLUGCHAR$,

NPLUGCHAR$

DELMIX$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

DELSTR$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

DELMIX$ (strex, strex)

LET a$ = DELMIX$ (text$, old$)

Returns the value of text$ with all occurrences of the value of old$, in any mix of upperand

lowercase, removed.

The DELMIX$ function removes from text$ all occurrences of the value of old$, without

regard to case. That is, it returns the value of text$ after having deleted any occurrences of

the value of old$ in any mix of uppercase and lowercase letters.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF DelMix$

LET a$ = "Now is the time for all good men"

LET b$ = "e"

PRINT DelMix$ (a$, b$)

END

produces the following output:

Now is th tim for all good mn

None

DELSTR$, DELCHAR$, REPMIX$, PLUGMIX$

STRLIB.TRC

DELSTR$ (strex, strex)

LET a$ = DELSTR$ (text$, old$)

Returns the value of text$ with all occurrences of the value of old$ removed.

The DELSTR$ function removes from text$ all occurrences of the value of old$. That is,

it returns the value of text$ after having deleted any occurrences of the value of old$.


7

True BASIC Language System

Example:

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF DelStr$

DO

LINE INPUT PROMPT “Enter a line (Return to quit): “: line$

IF line$ = “” then EXIT DO

PRINT DelStr$(line$, “,”)

LOOP

Exceptions:

See also:

END

deletes all commas from lines input by the user.

None

DELMIX$, DELCHAR$, REPSTR$, PLUGSTR$

DIGITS$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

DOLLARS$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

DIGITS$

LET set$ = DIGITS$

Returns the set of digit characters.

The DIGITS$ function returns a string containing the set of characters representing the

digits arranged in ascending order according to their ASCII codes. (For a table of the ASCII

codes and their corresponding characters, see Appendix A.)

That is, it returns the equivalent of the string constant:

“0123456789”

None.

None

LETTERS$, UPPER$, LOWER$, ALPHANUM$, PUNCT$, CONTROL$

STRLIB.TRC

DOLLARS$ (numex)

LET formatted$ = DOLLARS$ (number)

Returns the string representation of its numeric argument as a dollar amount.

The DOLLARS$ function returns the string representation of number as a nicely

formatted dollar amount.

The resulting string will begin with a dollar sign, have a comma between each set of three

digits to the left of the decimal point, and end with two digits to the right of the decimal

point. The resulting string will not contain any extraneous spaces or zeros (except those

zeros which may be necessary to provide two digits to the right of the decimal point).

The DOLLARS$ function is a convenient method for creating a very specific formatting of

numeric values. The USING$ function, however, provides much greater flexibility in how

numeric values are formatted.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Dollars$

PRINT Dollars$ (1234.5678)

END


String Handling Libraries 8

Exceptions:

See also:

produces output similar to the following:

$1,234.57

None

USING$ (built-in function)

DOLLARVAL Function

Library: STRLIB.TRC

Syntax: DOLLARVAL (strex)

Usage: LET number = DOLLARVAL (string$)

Summary: Returns the numeric value represented by the contents of its string argument, allowing dollar

signs, commas, asterisks, and embedded spaces.

Details: The DOLLARVAL function is a more flexible form of the VAL function. Like the VAL function

it returns the numeric value of contents of its string argument string$, but it ignores any

dollar signs, commas, asterisks, and spaces that may be embedded within the string.

Once the embedded dollar signs, commas, asterisks, and spaces have been removed, the string

value of string$ must represent a valid numeric constant in a form suitable for use with an

INPUT or READ statement. Note that this value may represent a valid numeric constant

expressed in exponential (or scientific) notation.

If the value of string$ does not represent a valid numeric constant once the embedded dollar

signs, commas, asterisks, and spaces have been removed, the DOLLARVAL function will

generate an error.

Example: The following program:

LIBRARY "StrLib.trc"

DECLARE DEF DollarVal

PRINT DollarVal ("$1,234.57")

END

produces the following output:

1234.57

Exceptions: 1004 Overflow in VAL.

4001 VAL string isn’t a proper number.

See also: VAL, LVAL, EVAL, SUPERVAL

ENGLISHNUM$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

ENGLISHNUM$ (numex)

LET english$ = ENGLISHNUM$ (number)

Returns the string representation of its numeric argument in English.

The ENGLISHNUM$ function returns the string representation of the proper English

name of number. For example, if passed a value of 117, the ENGLISHNUM$ function

would return the string value:

One Hundred and Seventeen

As you can see, the English name of the numeric value will be represented in mixed upperand

lowercase letters.

The English representation of a negative number will begin with the word “negative,” and

all numbers are rounded to five digits after the decimal point. Thus, if passed a value of

–3.1415926, the ENGLISHNUM$ function will return the string value:

negative Three point One Four One Five Nine

The ENGLISHNUM$ function uses the American, rather than British, names for large

numbers. Thus, passing a value of 1000000 results in a return value of:


9

True BASIC Language System

Example:

One Million

and passing a value of 1000000000 results in a return value of:

One Billion

Note that the results of the ENGLISHNUM$ function can be wrong for very large numbers

(usually those greater than 9,000,000,000) because of the inaccuracy introduced by floating

point round off errors.

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF EnglishNum$

Exceptions:

See also:

EVAL Function

Library:

Syntax:

Usage:

Summary:

Details:

FOR i = 1 to 10

FOR j = 1 to 10

PRINT EnglishNum$(i); “ times “; EnglishNum$(j);

PRINT “ is “; EnglishNum$(i*j)

NEXT j

NEXT i

GET KEY k

END

produces a multiplication table in English (that is, without using digits).

None

ROMAN$

STRLIB.TRC

EVAL (strex)

LET result = EVAL (expression$)

Returns the value of the constant-based expression represented by the contents of its string

argument.

The EVAL function evaluates the numeric expression represented by the value of

expression$ and returns the resulting value.

The value of expression$ must represent a numeric expression which is valid under the

rules of True BASIC. This expression may contain numeric constants, but not variables.

(For the evaluation of expressions containing variables, see the SUPERVAL subroutine.)

The value of expression$ may incorporate any of the following operators:

Operators Available to EVAL

+ - * / ^ ( )

In addition, the value of expression$ may incorporate any of the following numeric

functions:

Functions Available to EVAL

SIN COS TAN ATN SQR

SINH COSH TANH ASIN ACOS

SEC CSC COT MAXNUM EPS

PI SGN ABS RAD DEG

LOG LOG2 LOG10 EXP RND

INT ROUND IP FP CEIL

DATE

TIME

Note that numeric functions requiring two arguments, including the two-argument form of

the ROUND function, are not available for use in the value of expression$.

Also note that the EVAL function is not as fast as the VAL function, but it is a great deal

more flexible.


String Handling Libraries 10

Example:

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF Eval

PRINT Eval(“1.23e-3 + 2*(Sin(Pi/2)+Rnd)”)

INPUT PROMPT “Enter an expression: “: expr$

PRINT Eval(expr$)

GET KEY k

END

produces output similar to the following:

3.0982454

Enter an expression: 25 + 12 / 16 * Sin(Pi/3)

25.649519

Exceptions: 1 Eval string isn’t a proper expression.

2 Unknown function or variable in Eval.

3002 Negative number to non-integral power.

3003

3004

Zero to negative power.

LOG of number


11

True BASIC Language System

LET punct$ = “ !””#$%&’()*+,-./:;?@[\]^)_`{|}˜”

INPUT PROMPT “Enter name of file: “: fname$

OPEN #1: NAME fname$, ORG BYTE

ASK #1: FILESIZE fsize

READ #1, BYTES fsize: file$

LET delims$ = punct$ & Chr$(13) & Chr$(10)

CALL Explode(file$, words$(), delims$)

CALL SortS(words$())

MAT PRINT words$

Exceptions:

See also:

GET KEY k

END

prints a list of the words in a specified file arranged alphabetically.

None

EXPLODEN, NEXTWORD, BREAKUP

EXPLODEN Subroutine

Library:

Syntax:

numarrarg::

Usage:

Summary:

Details:

Example:

STRLIB.TRC

CALL EXPLODEN (strex, numarrarg, strex)

numarr

numarr bowlegs

CALL EXPLODEN (phrase$, numbers(), delims$)

Parses the contents of the specified phrase into an array of numbers, as delineated by the

specified delimiters.

The EXPLODEN subroutine breaks the specified “phrase” into the numeric “words” which

comprise it and returns the resulting words in the form of a numeric array.

A phrase is defined as any series of characters, and a word is defined as any series of

characters except those defined as delimiters. However, if a word does not define a valid

numeric constant, the EXPLODEN subroutine will generate an error.

When invoking the EXPLODEN subroutine, you pass the phrase as phrase$ and the

characters to be defined as delimiters as delims$. The subroutine then examines the phrase,

looking for the first set of one or more non-delimiter characters which are set off from the

rest of the phrase by delimiters, and assigns the numeric value of this set of non-delimiter

characters to the next available element of the numbers array. It then repeats the process,

beginning the search after the last assigned numeric value, until all of the numeric values in

the phrase have been assigned to the numbers array.

The process of breaking a phrase into its component parts is called parsing the phrase.

The EXPLODEN subroutine does not alter the value of phrase$. It will, however, adjust

the upper bound of the numbers array to ensure that the returned array has exactly one

element for each numeric value in the phrase.

To parse a phrase composed of non-numeric or mixed numeric values, use the EXPLODE

subroutine instead.

The following program:

LIBRARY "StrLib.trc"

DIM numbers(0)

LET phrase$ = "123,456,789.777"

CALL Exploden (phrase$, numbers(), ",.")

MAT PRINT numbers;

END


String Handling Libraries 12

produces the following output:

123 456 789 777

Exceptions: 4001 VAL string isn’t a proper number.

See also: EXPLODE, NEXTWORD, BREAKUP

FILLARRAY Subroutine

Library:

Syntax:

strarrarg::

Usage:

Summary:

Details:

Example:

STRLIB.TRC

CALL FILLARRAY (strarr, strarrarg, numex)

strarr

strarr bowlegs

CALL FILLARRAY (from$(), to$(), width)

“Fills” the contents of the to$ array to the specified width with the contents of the from$

array.

The FILLARRAY subroutine processes the contents of the from$ array to create the “filled”

array to$. The width to which the resulting to$ array will be filled is determined by the value

of width.

A common operation in text processing, filling is the process of organizing blocks of text so

that each line contains as many words as will fit within a specified margin. A blank line or a

line which begins with one or more spaces acts a “break,” which means that the following line

will not be absorbed into the previous line.

If a single word is encountered which has a length greater than width, it will be placed on a

line by itself; no error will be generated.

It is possible to pass the same array as both from$ and to$, eliminating the need for a

temporary array.

The FILLARRAY subroutine is useful for wrapping text to fit within a window with a known

margin.

The following program:

LIBRARY "StrLib.trc"

DIM from$(16), to$(0)

MAT READ from$

DATA Now, is, the, time, for, all, good, men

DATA to, come, to, the, aid, of, their, party

Exceptions:

See also:

CALL FillArray (from$(), to$(), 20)

FOR i = 1 to ubound(to$)

PRINT to$(i)

NEXT i

END

produces the following output:

Now is the time for

all good men to come

to the aid of their

party

None

FILLFROM, JUSTIFYARRAY, JUSTIFYFROM, LJUST$, RJUST$, CENTER$,

JUSTIFY$. HEADER$


13

True BASIC Language System

FILLFROM Subroutine

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

CALL FILLFROM (#rnumex, numex, strvar, strvar)

CALL FILLFROM (#1, width, result$, work$)

Returns a single “filled” line from the specified file.

The FILLFROM subroutine retrieves a “filled” line from the text file associated with the

specified channel number and returns it as result$. The width to which the resulting to$

array will be filled is determined by the value of width.

A common operation in text processing, filling is the process of organizing blocks of text so

that each line contains as many words as will fit within a specified margin. A blank line or a

line which begins with one or more spaces acts a “break,” which means that the following line

will not be absorbed into the previous line.

The FILLFROM subroutine treats the entire contents of the text file associated with the

specified channel number as the pool of text which needs to be filled. To process an entire file,

continue invoking the FILLFROM subroutine until the end of the file is reached.

The value of work$ is used internally by the FILLFROM subroutine. The first time you

invoke the FILLFROM subroutine for a given file, pass a work$ argument with a null string

value. Then continue passing the same work$ argument, without changing its contents, to

each invocation of the FILLFROM subroutine which you intend to read from the same file.

Failure to do so could result in the loss of data.

If a single word is encountered which has a length greater than width, it will be returned as

a line by itself; no error will be generated.

The following program:

LIBRARY “STRLIB.TRC”

OPEN #1: NAME “TextFile”

OPEN #2: PRINTER

DO WHILE MORE #1

CALL FillFrom(#1, 65, line$, work$)

PRINT #2: line$

LOOP

Exceptions:

See also:

END

would produce a printed listing of the filled contents of the file TEXTFILE.

None

FILLARRAY, JUSTIFYARRAY, JUSTIFYFROM, LJUST$, RJUST$, CENTER$,

JUSTIFY$. HEADER$

HEADER$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

HEADER$ (strex, strex, strex, numex, strex)

LET a$ = HEADER$ (left$, center$, right$, width, back$)

Creates a “header” of the specified width which contains the specified text items.

The HEADER$ function takes the values of left$, center$, and right$ and returns a

string of width characters which contains the values of these strings. The value of left$ will

be left-justified within the resulting string, the value of center$ will be centered within the

resulting string, and the value of right$ will be right-justified within the resulting string.

The extra characters between them will be comprised of the background pattern specified by

the value of back$.


String Handling Libraries 14

Example:

Exceptions:

See also:

The string resulting from an invocation of the HEADER$ function is commonly used as a

header or footer for formatted text.

Any or all of the values of left$, center$, and right$ may be the null string to eliminate

text in the appropriate position within the header.

If the value of back$ is the null string or a space, the extra characters between the items in

the header will be spaces.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Header$

LET left$ = "Contents"

LET center$ = "Page 1"

LET right$ = date$

PRINT Header$(left$, center$, right$, 50, " ")

END

produces the following output:

Contents Page 1 19980403

None

LJUST$, RJUST$, CENTER$, JUSTIFY$. FILLARRAY, FILLFROM,

JUSTIFYARRAY, JUSTIFYFROM

INTRIM$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

INTRIM$ (strex)

LET a$ = INTRIM$ (string$)

Returns the value of its argument string$ with all series of spaces within it reduced to a

single space.

The INTRIM$ function returns the value of its argument with all series of spaces within it

mapped to a single space. That is, it processes the value of string$ looking for any

occurrence of two or more contiguous spaces. Upon finding such an occurrence, the INTRIM$

function replaces the series of spaces with a single space.

The INTRIM$ function is useful for cleaning up the results of the USING$ function, which

can create strings with several extra spaces. The INTRIM$ function may also be used to undo

the results of the JUSTIFY$ function.

To completely remove all of the spaces from a string, use the NOSPACE$ function.

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF InTrim$

INPUT PROMPT “Enter two numbers: “: a, b

PRINT InTrim$(Using$(“#,### plus #,### equals ##,###”, a, b, a+b))

Exceptions:

See also:

END

produces output similar to the following:

Enter two numbers: 13, 1200

13 plus 1,200 equals 1,213

None

LTRIM$, RTRIM$, TRIM$, JUSTIFY$, NOSPACE$


15

True BASIC Language System

JUSTIFY$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

JUSTIFY$ (strex, numex)

LET a$ = JUSTIFY$ (text$, width)

Returns a string of the specified length containing the value of text$ justified.

The JUSTIFY$ function takes the value of text$ and adds spaces as necessary to create a

string containing width characters with the “words” in the value of text$ evenly spaced

within it. The extra spaces will be added to the value of text$ where spaces already exist in

order to “fill out” the value of text$ to the specified number of characters.

By filling out a series of lines, you can produce text with even left and right margins.

The JUSTIFY$ function never adds spaces to the beginning of the value of text$, even if it

begins with one or more spaces. This allows the JUSTIFY$ function to operate properly

when used with lines of indented text.

If the value of width is less than the length of text$, the JUSTIFY$ function generates

an error. Likewise, if the value of text$ contains no spaces, it cannot be filled, and the

JUSTIFY$ function generates an error. If the value of text$ is the null string, then the

JUSTIFY$ function returns the null string.

The JUSTIFY$ function does not work for lines containing more than 100 words. If you

pass a value of text$ which contains more than 100 words, the JUSTIFY$ function will

generate an error.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Justify$

LET text$ = "Now is the time for all good men"

FOR w = 32 to 40 step 2

PRINT Justify$(text$, w)

NEXT w

END

produces the following output:

Now is the time for all good men

Now is the time for all good men

Now is the time for all good men

Now is the time for all good men

Now is the time for all good men

Exceptions: 1 More than 100 words in line.

2 Can’t justify line.

See also:

LJUST$, RJUST$, CENTER$, HEADER$. FILLARRAY, FILLFROM,

JUSTIFYARRAY, JUSTIFYFROM

JUSTIFYARRAY Subroutine

Library:

Syntax:

strarrarg::

Usage:

Summary:

Details:

STRLIB.TRC

CALL JUSTIFYARRAY (strarr, strarrarg, numex)

strarr

strarr bowlegs

CALL JUSTIFYARRAY (from$(), to$(), width)

“Fills” and justifies the contents of the to$ array to the specified width with the contents of

the from$ array.

The JUSTIFYARRAY subroutine processes the contents of the from$ array to create the

“filled” and justified array to$. The width to which the resulting to$ array will be filled and

justified is determined by the value of width.


String Handling Libraries 16

Example:

A common operation in text processing, filling is the process of organizing blocks of text so that

each line contains as many words as will fit within a specified margin. A blank line or a line

which begins with one or more spaces acts a “break,” which means that the following line will not

be absorbed into the previous line, and the previous line will not be justified.

Another common operation in text processing, justification is the process of adding spaces

within a line so that the last character on the line falls evenly at the right margin. Spaces are

always added where spaces already exist within the line.

The JUSTIFYARRAY subroutine never adds spaces to the beginning of a line, even if it

begins with one or more spaces. This allows the JUSTIFYARRAY subroutine to operate

properly when it encounters indented lines.

If it encounters a line which contains no spaces, the JUSTIFYARRAY subroutine generates

an error, since such a line cannot be justified.

The JUSTIFYARRAY subroutine also cannot justify lines containing more than 100 words.

If it encounters a line which contains more than 100 words, the JUSTIFYARRAY subroutine

will generate an error.

It is possible to pass the same array as both from$ and to$, eliminating the need for a

temporary array.

The following program:

LIBRARY "StrLib.trc"

DIM from$(4), to$(4)

MAT READ from$

DATA Now is the time

DATA for all good men

DATA to come to the aid

DATA of their party.

CALL JustifyArray (from$(), to$(), 25)

FOR i = 1 to ubound(to$)

PRINT to$(i)

NEXT i

END

produces the following output:

Now is the time for all

good men to come to the

aid of their party.

Exceptions: 1 More than 100 words in line.

2 Can’t justify line.

See also: JUSTIFYFROM, FILLARRAY, FILLFROM, LJUST$, RJUST$, CENTER$,

JUSTIFY$. HEADER$

JUSTIFYFROM Subroutine

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

CALL JUSTIFYFROM (#rnumex, numex, strvar, strvar)

CALL JUSTIFYFROM (#1, width, result$, work$)

Returns a single “filled” and justified line from the specified file.

The JUSTIFYFROM subroutine retrieves a “filled” and justified line from the text file

associated with the specified channel number and returns it as result$. The contents

result$ will be filled and justified according to the value of width.

A common operation in text processing, filling is the process of organizing blocks of text so

that each line contains as many words as will fit within a specified margin. A blank line or a

line which begins with one or more spaces acts a “break,” which means that the following line

will not be absorbed into the previous line.


17

True BASIC Language System

Another common operation in text processing, justification is the process of adding spaces

within a line so that the last character on the line falls evenly at the right margin. Spaces are

always added where spaces already exist within the line.

The JUSTIFYFROM subroutine never adds spaces to the beginning of a line, even if it begins

with one or more spaces. This allows the JUSTIFYFROM subroutine to operate properly

when it encounters indented lines.

If it encounters a line which contains no spaces, the JUSTIFYFROM subroutine generates

an error, since such a line cannot be justified.

The JUSTIFYFROM subroutine also cannot justify lines containing more than 100 words. If

it encounters a line which contains more than 100 words, the JUSTIFYFROM subroutine

will generate an error.

The JUSTIFYFROM subroutine treats the entire contents of the text file associated with the

specified channel number as the pool of text which needs to be filled and justified. To process

an entire file, continue invoking the JUSTIFYFROM subroutine until the end of the file is

reached.

The value of work$ is used internally by the JUSTIFYFROM subroutine. The first time you

invoke the JUSTIFYFROM subroutine for a given file, pass a work$ argument with a null

string value. Then continue passing the same work$ argument, without changing its

contents, to each invocation of the JUSTIFYFROM subroutine which you intend to read from

the same file. Failure to do so could result in the loss of data.

Example: The following program:

LIBRARY "StrLib.trc"

OPEN #1: name "TextFile"

OPEN #2: Printer

DO while more #1

CALL JustifyFrom (#1, 65, line$, work$)

PRINT #2

LOOP

END

would produce a printed list of the justified contents of the text file TEXTFILE.

Exceptions: 1 More than 100 words in line.

2 Can’t justify line.

See also: JUSTIFYARRAY, FILLARRAY, FILLFROM, LJUST$, RJUST$, CENTER$,

JUSTIFY$. HEADER$

KEEPCHAR$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

KEEPCHAR$ (strex, strex)

LET a$ = KEEPCHAR$ (text$, oldchars$)

Returns the value of text$ with all characters which do not appear in oldchars$

removed.

The KEEPCHAR$ function removes from text$ all characters which are not members of

the character set represented by the value of oldchars$. That is, it returns the value of

text$ after having deleted any occurrences of characters which do not appear in the value

of oldchars$.

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF KeepChar$, Punct$

OPEN #1: NAME “InFile”, ORG BYTE

LET pun$ = Punct$


String Handling Libraries 18

DO WHILE MORE #1

READ #1, BYTES 10000: block$

LET sum = sum + Len(KeepChar$(block$, pun$))

LOOP

PRINT sum

Exceptions:

See also:

END

counts the punctuation in the file named INFILE.

None

DELCHAR$, REPCHAR$, NREPCHAR$, MAPCHAR$, PLUGCHAR$,

NPLUGCHAR$

LEFT$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

LEFT$ (strex, numex)

LET a$ = LEFT$ (string$, chars)

Returns the leftmost chars characters of string$.

The LEFT$ function returns a specific number of characters from the beginning of

string$. The number of characters to be returned is given by the value of chars.

If the value of chars is less than or equal to 0, the LEFT$ function returns the null string.

If the value of chars is greater than the number of characters in string$, the LEFT$

function returns the value of string$.

Note that the LEFT$ function can be useful when converting programs written in other

forms of BASIC. However, you will likely find that the substring expressions discussed in

Chapter 17 provide greater speed and flexibility.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Left$

LET a$ = "Now is the time"

FOR chars = 5 to 8

PRINT Left$(a$, chars)

NEXT chars

END

produces the following output:

Now i

Now is

Now is

Now is t

Exceptions:

See also:

None

RIGHT$, MID$

LETTERS$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

LETTERS$

LET set$ = LETTERS$

Returns the set of alphabetic characters.

The LETTERS$ function returns a string containing the set of characters representing the

letters of the alphabet, both uppercase and lowercase, arranged in ascending order

according to their ASCII codes. (For a table of the ASCII codes and their corresponding

characters, see Appendix A.)


19

True BASIC Language System

Example:

Exceptions:

See also:

That is, it returns the equivalent of the string constant:

“ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz”

None.

None

DIGITS$, UPPER$, LOWER$, ALPHANUM$, PUNCT$, CONTROL$

LJUST$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

LOWER$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

LJUST$ (strex, numex, strex)

LET a$ = LJUST$ (text$, width, back$)

Returns a string of the specified length containing the value of text$ left-justified.

The LJUST$ function takes the value of text$ and adds characters to the end of it as

necessary to create a string containing width characters with the value of text$ leftjustified

within it. The characters added will be determined by repeating the sequence of

characters specified by the value of back$.

If the length of text$ is greater than the value specified by width, the LJUST$ function

returns the value of text$ truncated to width characters. If the value of width is less than

or equal to 0, the LJUST$ function returns the null string.

The background pattern added to the end of the value of text$ will be formed in such a way

that all strings formed with the same value of back$ will have identical background patterns,

regardless of the value of text$. If the value of back$ is the null string or a space, the

background pattern will consist solely of blanks, or spaces.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF LJust$

LET a$ = "...Hello"

FOR chars = 10 to 12

PRINT LJust$(a$, chars, "*")

NEXT chars

END

produces the following output:

...Hello**

...Hello***

...Hello****

None

RJUST$, CENTER$, JUSTIFY$, HEADER$. FILLARRAY, FILLFROM,

JUSTIFYARRAY, JUSTIFYFROM

STRLIB.TRC

LOWER$

LET set$ = LOWER$

Returns the set of lowercase alphabetic characters.

The LOWER$ function returns a string containing the set of characters representing the

letters of the alphabet, in lowercase only, arranged in ascending order according to their

ASCII codes. (For a table of the ASCII codes and their corresponding characters, see Appendix

A.)

That is, it returns the equivalent of the string constant:

“abcdefghijklmnopqrstuvwxyz”


String Handling Libraries 20

Example:

Exceptions:

See also:

None.

None

UPPER$, LETTERS$, DIGITS$, ALPHANUM$, PUNCT$, CONTROL$

LVAL Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

MAPCHAR$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

LVAL (strex)

LET number = LVAL (string$)

Returns the numeric value represented by the contents of its string argument, ignoring any

extraneous characters on the end of the string.

The LVAL function is a “leftmost” form of the VAL function. Like the VAL function it returns

the numeric value of contents of its string argument string$, but it ignores any extraneous

characters at the end of the string.

The string value of string$ must begin with a valid numeric constant in a form suitable for

use with an INPUT or READ statement; however, it may contain any number of invalid

characters following this value. The numeric portion of the value may not contain embedded

spaces. Nor may this value contain commas, a dollar sign, or more than one decimal point.

Note, however, that this value may represent a valid numeric constant expressed in

exponential (or scientific) notation.

If the value of string$ does not begin with a valid numeric constant, the LVAL function

returns a value of 0.

The LVAL function is useful when converting programs written in other forms of BASIC,

which may interpret their VAL functions in this manner.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF LVal

PRINT LVal(" 123.45 dollars")

END

produces the following output:

123.45

None

VAL, DOLLARVAL, SUPERVAL, EVAL

STRLIB.TRC

MAPCHAR$ (strex, strex, strex)

LET a$ = MAPCHAR$ (text$, oldchars$, newchars$)

Returns the value of text$ with all characters in oldchars$ mapped to the associated

characters in newchars$.

The MAPCHAR$ function maps one set of characters onto another. It returns the value of

text$ after having replaced any occurrences of characters appearing in the value of

oldchars$ with their corresponding characters appearing in the value of newchars$.

The correspondence of the two character sets represented by oldchars$ and newchars$ is

based solely upon position within the set. That is, any occurrence of the first character in

oldchars$ will be replaced by the first character in newchars$, and so on.

For this reason, the values of oldchars$ and newchars$ must contain the same number

of characters; otherwise, the MAPCHAR$ function generates an error.


21

True BASIC Language System

Example:

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF Punct$, MapChar$

OPEN #1: NAME “InFile”

LET pun$ = Punct$

LET sp$ = Repeat$(“ “, Len(pun$))

DO WHILE MORE #1

LINE INPUT #1: line$

PRINT MapChar$(line$, pun$, sp$)

LOOP

END

lists the contents of a text file named INFILE, mapping all occurrences of punctuation to spaces.

Exceptions: 1 MapChar$ sets have different lengths.

See also: REPCHAR$, NREPCHAR$, DELCHAR$, KEEPCHAR$, PLUGCHAR$,

NPLUGCHAR$

MID$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

STRLIB.TRC

MID$ (strex, numex, numex)

LET a$ = MID$ (string$, start, chars)

Returns chars characters of string$ beginning at character position start.

The MID$ function returns a specific number of characters from a specified position within

string$. The number of characters to be returned is given by the value of chars. And the

character position at which this series of characters should begin is given by the value of

start.

If the value of start is less than 1, 1 will be used instead. If the value of start is greater

than the number of characters in string$ or the value of chars is less than or equal to 0,

the MID$ function returns the null string. If their are fewer than chars characters following

the position indicated by start, only the existing characters will be returned.

Note that the MID$ function can be useful when converting programs written in other forms

of BASIC. However, you will likely find that the substring expressions discussed in Chapter

17 provide greater speed and flexibility.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Mid$

LET a$ = "abcdefghijklmno"

FOR start = 5 to 8

PRINT Mid$(a$, start, start)

NEXT start

END

produces the following output:

efghi

fghijk

ghijklm

hijklmno

None

RIGHT$, LEFT$


String Handling Libraries 22

NEXTWORD Subroutine

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

NICEDATE$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

CALL NEXTWORD (strex, strex, strex)

CALL NEXTWORD (phrase$, word$, delims$)

Returns the next word, as delineated by any series of delimiter characters, from the specified

phrase.

The NEXTWORD subroutine returns the next “word” from the specified “phrase.”

A phrase is defined as any series of characters, and a word is defined as any series of

characters except those defined as delimiters.

When invoking the NEXTWORD subroutine, you pass the phrase as phrase$ and the

characters to be defined as delimiters as delims$. The subroutine then examines the phrase,

looking for the first set of one or more non-delimiter characters which are set off from the rest

of the phrase by delimiters, and returns this set of non-delimiter characters after having

stripped off any leading or trailing delimiters. It also updates the value of phrase$ to

eliminate the returned word and its adjacent delimiters.

For example, assume you have passed delim$ with a value of “*#;” and phrase$ with a

value of “***abc***def**” to the NEXTWORD subroutine. The subroutine would return

word$ with a value of “abc” and phrase$ with a new value of “def**”. This process is often

referred to as parsing a phrase.

If the value of phrase$ is the null string or contains nothing but delimiters, the

NEXTWORD subroutine will return both word$ and phrase$ with values of the null string.

Note that the NEXTWORD subroutine is closely related to, but subtly different from, the

BREAKUP subroutine. The NEXTWORD subroutine treats a series of contiguous delimiter

characters as a single delimiter, while the BREAKUP subroutine treats each individual

delimiter character as a delimiter in its own right. For some applications you will want to use

the NEXTWORD subroutine, for others you will want to use the BREAKUP subroutine.

The following program:

LIBRARY "StrLib.trc"

LET s$ = "Now is the time for all good men"

DO

CALL NextWord (s$, word$, " ")

IF word$ = "" then EXIT DO

PRINT word$,

LOOP

END

produces the following output:

Now is the time for

all good men

None

BREAKUP, EXPLODE, EXPLODEN

STRLIB.TRC

NICEDATE$ (strex)

LET a$ = NICEDATE$ (adate$)

Returns the date represented by the value of adate$ in string form consisting of the month

name, the day of the month, and the year.

The NICEDATE$ function takes as its argument a date in the format produced by the

DATE$ function and returns that date in expanded form. This expanded form consists of the

full name of the month, the day of the month, and the full year.


23

True BASIC Language System

The value of adate$ must represent a date in the same format produced by the DATE$

function. That is, the value of adate$ must be a string in the form “YYYYMMDD”, where

YYYY represents the year, MM the month, and DD the day. If adate$ does not represent

such a value, then the NICEDATE$ function generates an error.

To return the current date in the same format, use the TODAY$ function. To return a date in

an abbreviated format, use the SHORTDATE$ function.

Example: The following program:

LIBRARY "StrLib.trc"

DECLARE DEF NiceDate$

PRINT NiceDate$("19971015")

END

produces the following output:

October 15, 1997

Exceptions: 1 Bad date given to NiceDate$: 00000000

See also: DATE$, DATE, SHORTDATE$, WEEKDAY$, WEEKDAY, TODAY$, TIME, TIME$,

NICETIME$, NOW$

NICETIME$ Function

Library: STRLIB.TRC

Syntax: NICETIME$ (strex)

Usage: LET a$ = NICETIME$ (atime$)

Summary: Returns the time represented by the value of atime$ in string form consisting of the hour and

minute and an indication of a.m. or p.m.

Details: The NICETIME$ function takes as its argument a time measured by the 24-hour clock and

returns that time as measured by the 12-hour clock in string form. The returned time will be

in the form “HH:MM”, where HH is the hour and MM is the minute, and the string “ a.m.” or

“ p.m.” will be appended as appropriate.

The value of atime$ must represent a time measured by the 24-hour clock in the same format

produced by the TIME$ function. That is, the value of atime$ must be a string in the form

“HH:MM:SS”, where HH represents the hour, MM the minute, and SS the second. If atime$

does not represent such a value, then the NICETIME$ function generates an error.

To return the current time in the same format, use the NOW$ function.

Example: The following program:

LIBRARY "StrLib.trc"

DECLARE DEF NiceTime$

PRINT NiceTime$("16:50:58")

END

produces output similar to the following:

4:50 p.m.

Exceptions: 1 Bad time given to NiceTime$: 99:99:99

See also: TIME$, TIME, NOW$, DATE, DATE$, NICEDATE$, SHORTDATE$, WEEKDAY$,

WEEKDAY, TODAY$

NOSPACE$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

NOSPACE$ (strex)

LET a$ = NOSPACE$ (string$)

Returns the value of its argument string$ with all spaces removed.

The NOSPACE$ function returns the value of its argument with all spaces removed.


String Handling Libraries 24

Example:

Exceptions:

See also:

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF NoSpace$

LET s$ = "Now is the time"

PRINT s$

PRINT NoSpace$(s$)

END

produces output similar to the following:

Now is the time

Nowisthetime

None

LTRIM$, RTRIM$, TRIM$, JUSTIFY$, INTRIM$

NOW$ Function

Library: STRLIB.TRC

Syntax: NOW$

Usage: LET a$ = NOW$

Summary: Returns the current time in string form consisting of the hour and minute and an indication

of a.m. or p.m.

Details: The NOW$ function returns the current time as measured by the 12-hour clock in string form.

The time will be in the form “HH:MM”, where HH is the hour and MM is the minute, and the

string “ a.m.” or “ p.m.” will be appended as appropriate.

If the current computer hardware is not able to report the time, then the NOW$ function

generates an error.

The NOW$ function obtains its results from your operating system, which in turn obtains its

results from your computer’s internal clock. If you find that the NOW$ function is returning

erroneous results, you most likely have to reset your computer’s internal clock.

To return an arbitrary time in the same format, use the NICETIME$ function.

Example: The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Now$

PRINT Now$

END

produces output similar to the following:

1:06 p.m.

Exceptions: 1 Bad time given to NiceTime$: 99:99:99

See also: TIME$, TIME, NICETIME$, DATE, DATE$, NICEDATE$, SHORTDATE$,

WEEKDAY$, WEEKDAY, TODAY$

NPLUGCHAR$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

NPLUGCHAR$ (strex, strex, strex)

LET a$ = NPLUGCHAR$ (text$, chars$, template$)

Returns the value of text$ with all characters which do not appear in chars$ replaced by

the specified template.

The NPLUGCHAR$ function replaces all characters in text$ which are not also members

of the character set represented by the value of chars$. Each occurrence within text$ of a

character that is not part of chars$ is replaced by the value of template$.


25

True BASIC Language System

Example:

Exceptions:

See also:

The NPLUGCHAR$ function differs from the NREPCHAR$ function in that the value of

template$ is treated as a template. This means that each occurrence of the character

combination “#1” within the value of template will be replaced with the value of the character

which will be replaced by the template.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF AlphaNum$, NPlugChar$

LET text$ = "Now is the time"

PRINT NPlugChar$(text$, AlphaNum$, "|")

END

produces the following output:

Now|is|the|time

None

PLUGCHAR$, DELCHAR$, KEEPCHAR$, REPCHAR$, NREPCHAR$, MAPCHAR$

NREPCHAR$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

NREPCHAR$ (strex, strex, strex)

LET a$ = NREPCHAR$ (text$, oldchars$, new$)

Returns the value of text$ with all characters not appearing in oldchars$ replaced by the

value of new$.

The NREPCHAR$ function maps all characters which are not members of a character set to

a single string. It returns the value of text$ after having replaced any occurrences of

characters not appearing in the value of oldchars$ with the value of new$.

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF Digits$, NRepChar$

OPEN #1: NAME “InFile”

LET chars$ = Digits$

DO WHILE MORE #1

LINE INPUT #1: line$

PRINT NRepChar$(line$, chars$, “ “)

LOOP

Exceptions:

See also:

GET KEY k

END

lists the contents of a text file named INFILE, replacing all characters which are not digits

with spaces.

None

REPCHAR$, MAPCHAR$, DELCHAR$, KEEPCHAR$, PLUGCHAR$,

NPLUGCHAR$

PLUGCHAR$ Function

Library:

Syntax:

Usage:

Summary:

STRLIB.TRC

PLUGCHAR$ (strex, strex, strex)

LET a$ = PLUGCHAR$ (text$, chars$, template$)

Returns the value of text$ with all characters which do appear in chars$ replaced by the

specified template.


String Handling Libraries 26

Details:

Example:

The PLUGCHAR$ function replaces all characters in text$ which are members of the

character set represented by the value of chars$. Each occurrence of a character from

chars$ within text$ is replaced by the value of template$.

The PLUGCHAR$ function differs from the REPCHAR$ function in that the value of

template$ is treated as a template. This means that each occurrence of the character

combination “#1” within the value of template$ will be replaced with the value of the

character which will be replaced by the template.

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF Control$, PlugChar$

OPEN #1: NAME “InFile”

OPEN #2: NAME “OutFile”, CREATE NEW

LET ctl$ = Control$

DO WHILE MORE #1

LINE INPUT #1: line$

PRINT #2: PlugChar$(line$, ctl$, “/#1”

LOOP

Exceptions:

See also:

END

places a slash (\) before each control character in the file named INFILE and stores the results

in the file named OLDFILE.

None

NPLUGCHAR$, DELCHAR$, KEEPCHAR$, REPCHAR$, NREPCHAR$,

MAPCHAR$

PLUGMIX$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

STRLIB.TRC

PLUGMIX$ (strex, strex, strex)

LET a$ = PLUGMIX$ (text$, old$, template$)

Returns the value of text$ with occurrences of the value of old$, in any mix of upper- and

lowercase, replaced by the specified template.

The PLUGMIX$ function replaces all occurrences of the value of old$, in any mix of

uppercase and lowercase, within text$. Each occurrence of the value of old$ within text$

is replaced by the value of template$.

The PLUGMIX$ function differs from the REPMIX$ function in that the value of

template$ is treated as a template. This means that each occurrence of the character

combination “#1” within the value of template$ will be replaced with the value of old$ as

it was found in text$.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF PlugMix$

LET text$ = "Now is tHe time"

PRINT PlugMix$(text$, "the", "THE")

END

produces the following output:

Now is THE time

None

PLUGSTR$, PLUGCHAR$, REPMIX$, DELMIX$


27

True BASIC Language System

PLUGSTR$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

PUNCT$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

REPCHAR$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

PLUGSTR$ (strex, strex, strex)

LET a$ = PLUGSTR$ (text$, old$, template$)

Returns the value of text$ with occurrences of the value of old$ replaced by the specified

template.

The PLUGSTR$ function replaces all occurrences of the value of old$ within text$. Each

occurrence of the value of old$ within text$ is replaced by the value of template$.

The PLUGSTR$ function differs from the REPSTR$ function in that the value of template$

is treated as a template. This means that each occurrence of the character combination “#1”

within the value of template$ will be replaced with the value of old$.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF PlugMix$

PRINT PlugMix$("x/x", "x", "(#1+#1)")

END

produces the following output:

(x+x)/(x+x)

None

PLUGMIX$, PLUGCHAR$, REPSTR$, DELSTR$

STRLIB.TRC

PUNCT$

LET set$ = PUNCT$

Returns the set of punctuation characters.

The PUNCT$ function returns a string containing the set of characters representing

punctuation, arranged in ascending order according to their ASCII codes. (For a table of the

ASCII codes and their corresponding characters, see Appendix A.)

That is, it returns the equivalent of the string constant:

“ !””#$%&’()*+,-./:;?@[\]^_`{|}˜”

where the pair of consecutive quotation marks results in the inclusion of a single quotation

mark.

Note that this function returns only those punctuation characters represented in the standard

ASCII character set. Depending upon the current operating environment there may be

additional punctuation characters available which are not represented within the results of

the PUNCT$ function.

None.

None

UPPER$, LOWER$, LETTERS$, DIGITS$, ALPHANUM$, CONTROL$

STRLIB.TRC

REPCHAR$ (strex, strex, strex)

LET a$ = REPCHAR$ (text$, oldchars$, new$)

Returns the value of text$ with all characters in oldchars$ replaced by the value of

new$.

The REPCHAR$ function maps the members of a character set to a single string. It returns

the value of text$ after having replaced any occurrences of characters appearing in the


String Handling Libraries 28

Example:

value of oldchars$ with the value of new$.

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF Punct$, RepChar$

OPEN #1: NAME “InFile”

LET chars$ = Punct$

DO WHILE MORE #1

LINE INPUT #1: line$

PRINT RepChar$(line$, chars$, “”)

LOOP

Exceptions:

See also:

GET KEY k

END

lists the contents of a text file named INFILE, replacing all occurrences of punctuation with

the phrase “”.

None

MAPCHAR$, NREPCHAR$, DELCHAR$, KEEPCHAR$, PLUGCHAR$,

NPLUGCHAR$, REPSTR$, REPMIX$

REPMIX$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

REPMIX$ (strex, strex, strex)

LET a$ = REPMIX$ (text$, old$, new$)

Returns the value of text$ with all occurrences of the value of old$, in any mix of upperand

lowercase letters, replaced by the value of new$.

The REPMIX$ function replaces occurrences of one substring with another, ignoring case.

It returns the value of text$ after having replaced any occurrences of the value of old$, in

any mix of upper- and lowercase letters, with the value of new$.

If the value of old$ does not appear within the value of text$, the REPMIX$ function

returns the value of text$ untouched.

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF RepMix$

OPEN #1: NAME “InFile”

OPEN #2: NAME “OutFile”, CREATE NEW

SET #2: MARGIN MAXNUM

DO WHILE MORE #1

LINE INPUT #1: line$

PRINT #2: RepMix$(line$, “print”, “PRINT”)

LOOP

Exceptions:

See also:

END

copies the contents of the file named INFILE to the newly created file named OUTFILE,

changing all occurrences of the word “print,” regardless of case, into uppercase.

None

REPSTR$, REPCHAR$, DELSTR$, PLUGSTR$


29

True BASIC Language System

REPSTR$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

REPSTR$ (strex, strex, strex)

LET a$ = REPSTR$ (text$, old$, new$)

Returns the value of text$ with all occurrences of the value of old$ replaced by the value

of new$.

The REPSTR$ function replaces occurrences of one substring with another. It returns the

value of text$ after having replaced any occurrences of the value of old$ with the value of

new$.

If the value of old$ does not appear within the value of text$, the REPSTR$ function

returns the value of text$ untouched.

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF RepStr$

OPEN #1: NAME “InFile”, ORG BYTE

OPEN #2: NAME “OutFile”, CREATE NEW, ORG BYTE

LET cr$ = Chr$(13)

LET crlf$ = cr$ & Chr$(10)

DO WHILE MORE #1

READ #1, BYTES 10000: block$

WRITE #2: RepStr$(line$, cr$, crlf$)

LOOP

Exceptions:

See also:

END

copies the contents of the file named INFILE to the newly created file named OUTFILE,

changing all occurrences of a carriage return to a carriage return followed by a line feed.

None

REPMIX$, REPCHAR$, DELSTR$, PLUGSTR$

REVERSE$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

REVERSE$ (strex)

LET a$ = REVERSE$ (string$)

Returns the value of its argument string$ with all of its characters in reverse order.

The REVERSE$ function accepts a string argument, reverses the order of the characters

which it contains, and returns the result.

If the value of its argument is the null string, the REVERSE$ function will return the null

string.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Reverse$

DIM text$(3)

MAT READ text$

DATA madam, im, adam

FOR i = 1 to 3

IF text$(i) = Reverse$(text$(i)) then

PRINT text$(i); " is a palindrome"

ELSE


String Handling Libraries 30

Exceptions:

PRINT text$(i); " is not a palindrome"

END IF

NEXT i

END

produces the following output:

madam is a palindrome

im is not a palindrome

adam is not a palindrome

None

RIGHT$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

RJUST$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

RIGHT$ (strex, numex)

LET a$ = RIGHT$ (string$, chars)

Returns the rightmost chars characters of string$.

The RIGHT$ function returns a specific number of characters from the end of string$.

The number of characters to be returned is given by the value of chars.

If the value of chars is less than or equal to 0, the RIGHT$ function returns the null

string. If the value of chars is greater than the number of characters in string$, the

RIGHT$ function returns the value of string$.

Note that the RIGHT$ function can be useful when converting programs written in other

forms of BASIC. However, you will likely find that the substring expressions discussed in

Chapter 17 provide greater speed and flexibility.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Right$

LET a$ = "Now is the time"

FOR chars = 5 to 8

PRINT Right$(a$, chars)

NEXT chars

END

produces output similar to the following:

time

e time

he time

the time

None

LEFT$, MID$

STRLIB.TRC

RJUST$ (strex, numex, strex)

LET a$ = RJUST$ (text$, width, back$)

Returns a string of the specified length containing the value of text$ right-justified.

The RJUST$ function takes the value of text$ and adds characters to the beginning of it as

necessary to create a string containing width characters with the value of text$ rightjustified

within it. The characters added will be determined by repeating the sequence of

characters specified by the value of back$.

If the length of text$ is greater than the value specified by width, the RJUST$ function

returns the value of text$ truncated to width characters. If the value of width is less than

or equal to 0, the RJUST$ function returns the null string.


31

True BASIC Language System

Example:

Exceptions:

See also:

The background pattern added to the beginning of the value of text$ will be formed in such

a way that all strings formed with the same value of back$ will have identical background

patterns, regardless of the value of text$. If the value of back$ is the null string or a space,

the background pattern will consist solely of blanks, or spaces.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF RJust$

LET a$ = "...Hello"

FOR chars = 10 to 12

PRINT RJust$(a$, chars, "*")

NEXT chars

END

produces the following output:

**...Hello

***...Hello

****...Hello

None

LJUST$, CENTER$, JUSTIFY$, HEADER$. FILLARRAY, FILLFROM,

JUSTIFYARRAY, JUSTIFYFROM

RNDSTR$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

RNDSTR$ (strex, numex)

LET a$ = RNDSTR$ (chars$, length)

Returns a string of the specified length composed of characters randomly chosen from the

characters comprising the value of chars$.

The RNDSTR$ function returns a randomly generated string. The length of the string will be

determined by the value of length, and the characters in the string will be drawn randomly

from the characters comprising the value of chars$.

If a single character appears more than once in the value of chars$, the probability of that

character appearing in the resulting string will be increased appropriately.

The RNDSTR$ function is useful for creating names for temporary files. It is also useful for

creating strings to test string handling algorithms.

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF RndStr$

LET first$ = “ABCDEFGHIJKLMNOPQRSTUVWXYZ”

LET rest$ = first$ & “0123456789”

DO

LET fname$ = RndStr$(first$,1) & RndStr$(rest$,7)

WHEN ERROR IN

OPEN #1: NAME fname$, CREATE NEW

EXIT DO

USE

! Do nothing

END WHEN

LOOP

PRINT “File created: “; fname$

GET KEY k

END


String Handling Libraries 32

Exceptions:

uses the RNDSTR$ function to create a temporary file name and then uses that name to

create the file. Note that the name begins with a letter and then contains seven characters

which may be letters or digits.

None

ROMAN$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

STRLIB.TRC

ROMAN$ (numex)

LET romannum$ = ROMAN$ (number)

Returns the string representation of its numeric argument in Roman numerals.

The ROMAN$ function returns the string representation of the value of number as Roman

numerals. For example, if passed a value of 117, the ROMAN$ function would return the

string value:

CXVII

As you can see, the Roman numerals will be represented entirely in uppercase letters.

The Roman representation of a negative number will begin with a minus sign.

Since Roman numerals may only represent whole numbers, the ROMAN$ function will

generate an error if you pass it a non-integer value.

The following program:

LIBRARY “STRLIB.TRC”

DECLARE DEF Roman$

LET year$ = Roman$(1900+Int(Date/1000))

PRINT “Copyright (c) “; year$; “ by True BASIC, Inc.”

Exceptions:

See also:

END

produces the following output:

Copyright (c) MCMXCIV by True BASIC, Inc.”

None

ENGLISHNUM$

SHORTDATE$ Function

Library:

Syntax:

Usage:

Summary:

Details:

STRLIB.TRC

SHORTDATE$ (strex)

LET a$ = SHORTDATE$ (adate$)

Returns the date represented by the value of adate$ in string form consisting of the day of

the month, the month name, and the year in abbreviated format.

The SHORTDATE$ function takes as its argument a date in the format produced by the

DATE$ function and returns that date in abbreviated, but legible, form. This abbreviated

form consists of the day of the month, the three-character abbreviation of the month name,

and the last two digits of the year.

The value of adate$ must represent a date in the same format produced by the DATE$

function. That is, the value of adate$ must be a string in the form “YYYYMMDD”, where

YYYY represents the year, MM the month, and DD the day. If adate$ does not represent

such a value, then the SHORTDATE$ function generates an error.

To return a date in an expanded format, use the NICEDATE$ function.


33

True BASIC Language System

Example: The following program:

LIBRARY "StrLib.trc"

DECLARE DEF ShortDate$

PRINT ShortDate$("19971015")

END

produces the following output:

15 Oct 97

Exceptions: 1 Bad date given to ShortDate$: 00000000

See also: DATE$, DATE, SHORTDATE$, WEEKDAY$, WEEKDAY, TODAY$, TIME, TIME$,

NICETIME$, NOW$

SUPERVAL Subroutine

Library:

Syntax:

strarrarg::

Usage:

Summary:

Details:

STRLIB.TRC

CALL SUPERVAL (strarrarg, strex, numvar)

strarr

strarr bowlegs

CALL SUPERVAL (table$(), expression$, result)

Evaluates the expression represented by the contents of expression$ and returns the

resulting value in result.

The SUPERVAL subroutine evaluates the numeric expression represented by the value of

expression$ and returns the resulting value in result.

The value of expression$ must represent a numeric expression which is valid under the

rules of True BASIC. This expression may contain both numeric constants and variables.

You can use expressions like “a = 2” or “length, width, height = 1” to create variables and set

their values.

Like the numeric constants, the variables used in expression$ must follow True BASIC’s

rules for the formation of variable names. These variables are not connected with the variables

used in your program code; they form their own variable pool which is created and used

exclusively by the SUPERVAL subroutine.

The SUPERVAL subroutine uses the table$ array to manage this pool of variables. You

don’t need to worry about maintaining the table$ array; just pass any one-dimensional

array as table$, and the SUPERVAL subroutine will do the rest. However, since the

table$ array is used to store the variable pool, you should be sure to pass the same table$

array to each invocation of the SUPERVAL subroutine which you would like to have access

to the variables in that pool.

The value of expression$ may incorporate any of the following operators:

Operators Available to SUPERVAL

+ - * / ^ ( )

In addition, the value of expression$ may incorporate any of the following numeric functions:

Functions Available to SUPERVAL

SIN COS TAN ATN SQR

SINH COSH TANH ASIN ACOS

SEC CSC COT MAXNUM EPS

PI SGN ABS RAD DEG

LOG LOG2 LOG10 EXP RND

INT ROUND IP FP CEIL

DATE

TIME

Note that numeric functions requiring two arguments, including the two-argument form of

the ROUND function, are not available for use in the value of expression$.


String Handling Libraries 34

Example:

The following program:

LIBRARY “STRLIB.TRC”

DIM vars$(1)

CALL SuperVal(vars$(), “a = 3^2”, result)

CALL SuperVal(vars$(), “b = Sqr(a)”, result)

PRINT result

DO

LINE INPUT PROMPT “Expression (0 to quit): “: expr$

IF expr$ = “0” then EXIT DO

CALL SuperVal(vars$(), expr$, result)

PRINT result

LOOP

END

produces output similar to the following:

3

Expression (0 to quit): a

9

Expression (0 to quit): b

3

Expression (0 to quit): a + b

12

Expression (0 to quit): c = a/(b*2)

1.5

Expression (0 to quit): a * Pi

28.274334

Expression (0 to quit): 0

Exceptions: 1 SuperVal string isn’t a proper expression.

2 Unknown function or variable in SuperVal.

3 Bad variable name in SuperVal: name

3002 Negative number to non-integral power.

3003 Zero to negative power.

3004 LOG of number


35

True BASIC Language System

Example: None.

Exceptions: 1 Bad date given to NiceDate$: 00000000

1 Bad date given to WeekDay: 00000000

1 Bad date given to WeekDay$: 00000000

See also: DATE$, DATE, NICEDATE$, SHORTDATE$, WEEKDAY$, WEEKDAY, TIME,

TIME$, NICETIME$, NOW$

UNIQ$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

UPPER$ Function

Library:

Syntax:

Usage:

Summary:

Details:

Example:

Exceptions:

See also:

WEEKDAY Function

Library:

Syntax:

STRLIB.TRC

UNIQ$ (strex)

LET a$ = UNIQ$ (text$)

Returns the set of characters contained within the value of text$.

The UNIQ$ function returns a string containing the set of characters contained in the value

of its argument.

That is, the UNIQ$ function returns a string which contains one of each character which

appears in the value of its argument. The characters will be organized within the resulting

string in ascending order by their ASCII codes. Thus, uppercase letters will be listed before

all lowercase letters.

The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Uniq$

LET s$ = "Now is the time for all good men"

PRINT s$

PRINT Uniq$(s$)

END

produces the following output:

Now is the time for all good men

Nadefghilmnorstw

None

CHARUNION$, CHARINT$, CHARDIFF$, CHARS$

STRLIB.TRC

UPPER$

LET set$ = UPPER$

Returns the set of uppercase alphabetic characters.

The UPPER$ function returns a string containing the set of characters representing the

letters of the alphabet, in uppercase only, arranged in ascending order according to their

ASCII codes. (For a table of the ASCII codes and their corresponding characters, see

Appendix A.)

That is, it returns the equivalent of the string constant:

“ABCDEFGHIJKLMNOPQRSTUVWXYZ”

None.

None

LOWER$, LETTERS$, DIGITS$, ALPHANUM$, PUNCT$, CONTROL$

STRLIB.TRC

WEEKDAY (strex)


String Handling Libraries 36

Usage: LET a = WEEKDAY (adate$)

Summary: Returns the number of the weekday on which the specified date falls.

Details: The WEEKDAY function takes as its argument a date in the format produced by the DATE$

function and returns the number of the day of the week on which that date falls.

The WEEKDAY function returns a number between 1 and 7, inclusive, where 1 indicates

Sunday and 7 indicates Saturday.

The value of adate$ must represent a date between the years 1901 and 2099, inclusive, in

the same format produced by the DATE$ function. That is, the value of adate$ must be a

string in the form “YYYYMMDD”, where YYYY represents the year, MM the month, and DD

the day. If adate$ does not represent such a value, then the WEEKDAY function generates

an error.

To return the full name of the day of the week on which a particular date falls, use the

WEEKDAY$ function.

Example: The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Weekday

PRINT Weekday("19971015")

END

produces the following output:

4

Exceptions: 1 Bad date given to WeekDay: 00000000

See also: DATE$, DATE, NICEDATE$, SHORTDATE$, TODAY$, WEEKDAY$, TIME, TIME$,

NICETIME$, NOW$

WEEKDAY$ Function

Library: STRLIB.TRC

Syntax: WEEKDAY$ (strex)

Usage: LET a$ = WEEKDAY$ (adate$)

Summary: Returns the full name of the weekday on which the specified date falls.

Details: The WEEKDAY$ function takes as its argument a date in the format produced by the DATE$

function and returns the full name of the day of the week on which that date falls.

The value of adate$ must represent a date between the years 1901 and 2099, inclusive, in

the same format produced by the DATE$ function. That is, the value of adate$ must be a

string in the form “YYYYMMDD”, where YYYY represents the year, MM the month, and DD

the day. If adate$ does not represent such a value, then the WEEKDAY$ function generates

an error.

To return the number of the day of the week on which a particular date falls, use the

WEEKDAY function.

Example: The following program:

LIBRARY "StrLib.trc"

DECLARE DEF Weekday$

PRINT Weekday$("19971015")

END

produces the following output:

Wedneadsy

Exceptions: 1 Bad date given to WeekDay$: 00000000

See also: DATE$, DATE, NICEDATE$, SHORTDATE$, TODAY$, WEEKDAY, TIME, TIME$,

NICETIME$, NOW$

More magazines by this user
Similar magazines