07.05.2015 Views

Bronze Edition Guide - True BASIC

Bronze Edition Guide - True BASIC

Bronze Edition Guide - True BASIC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

178 BRONZE <strong>Edition</strong> <strong>Guide</strong><br />

NUM Function<br />

NUM (strex)<br />

NUM returns the numerical value that is stored as a string, which must contain exactly<br />

eight characters, using the IEEE eight-byte format. Normally, the string will have been<br />

previously constructed with the NUM$ function.<br />

NUM$ Function<br />

NUM$ (numex)<br />

NUM$ returns a string of length eight that contains the numberical value using the IEEE<br />

eight-byte format. Normally, the NUM function must be used to convert the string back to<br />

a number.<br />

ORD Function<br />

ORD(string-expression)<br />

Returns the ordinal position in the ASCII character set of the character given by stringexpression,<br />

which must be either a single character or an allowable two- or three-character<br />

name of certain ASCII characters as described in Appendix A, except that ORD("") = –1<br />

("" denotes the null string.) ORD is the opposite of the CHR$ function in that<br />

ORD(CHR$(n)) = n for all n in the range 0 to 255. However, CHR$(ORD(a$)) = a$ only if<br />

the value of a$ is a single ASCII character.<br />

PI Function<br />

PI<br />

A no-argument function, PI returns the value of pi, the ratio of a circle’s circumference to<br />

its diameter (approximately equal to 3.14159265).<br />

POS Function<br />

POS(string-expression, string-expression)<br />

POS(string-expression, string-expression, rnumeric-expression)<br />

Returns the position of the first character of the first occurrence of the entire second<br />

string in the first string. If the second string does not appear in the first string, or if the<br />

first string is empty while the second is not, then POS returns 0. If the second string is<br />

empty, then POS returns 1.<br />

If a third argument is present, then the search for the second string starts at that character<br />

position in the first string given by that number and proceeds to the right. If the second<br />

string is empty, POS returns the starting position. The first form of POS is equivalent<br />

to the second form with the third argument equal to one.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!