PocketC 2 [3.61] SOUND beep(int type) generates a system sound, where type is between 1 and 7. Available sounds are info[1], warning[2], error[3], startup[4], alarm[5], confirmation[6], and click[7]. Note: not all sounds are unique in current versions of PalmOS. --- tone(int freq, int dur) generates a tone of frequency freq (in Hz), and duration dur (in milliseconds). STRING strlen(string) returns the length of a string. --- substr(string, int first, int len) returns a string which consists of len characters from the original string starting at first character. (e.g. substr("Hello", 1, 3) returns "ell") --- strleft(string, int len) returns the len leftmost characters from the string. --- strright(string, int len) returns the len rightmost characters from the string. --- strupr(string) returns the original string in all uppercase. --- strlwr(string) returns the original string in all lowercase. --- strstr(string str, string sub, int first) searches str for a substring sub starting at the character first. Returns the starting position of sub within str or -1 on failure. --- hex(int n) returns the hexadecimal representation of n --- format(float f, int prec) returns the string representation of f with prec decimal places. --- strtoc(string str, pointer ptr) fill the array of chars pointed to by ptr with the characters from the string str. --- ctostr(pointer ptr) takes the char array pointed to by ptr, and returns a string composed of its characters. The memory pointed to by ptr must be of type char and must end with a 0. TIME/DATE ticks() the number of clock ticks since last reset --- seconds() the number of seconds since Jan 1, 1904 minus 2^31 --- time(int mode) [mode 0] integer value (hour*100+minute) [mode 1] string value (as determined by system preferences) [mode 2] integer value (hour*10000+minute*100+sec) --- date(int mode) [mode 0] integer value (year*10000+month*100+day) [mode 1] short string value [mode 2] long string value (as determined by system preferences) MATH (Note: Functions that require MathLib will return integer 0 if the library is not present. ) cos, sin, tan, acos, asin, atan, cosh, sinh, tanh, acosh, asinh, atanh (float) returns the expected trigonometric value, using radians. [MathLib] --- pow(float x, float y) returns x^y. [MathLib] --- atan2(float y, float x) returns the arctangent of y/x. [MathLib] --- sqrt(float x) returns square root of x. [MathLib] --- log(float x) returns natural log of x. [MathLib] --- log10(float x) returns log base 10 of x. [MathLib] --- exp(float x) returns e^x. [MathLib] --- rand() returns a random float between 0 and 1. --- random(int n) returns a random int between 0 and n-1. --- mathlib() returns 1 if MathLib is present, 0 otherwise. MEMOPAD I/O mmnew() create a new, empty memo, returns 0 on failure. --- mmfind(string name) opens the memo with name as its first line, returns 0 on failure. --- mmopen(int id) opens the memo with the given id, returns 0 on failure. This function is not recommended, but is included for completeness. --- mmputs(string) appends the given string to the end of the memo. --- mmgetl() retrieves a string from the current position in the memo. Does not include the newline. --- mmeof() returns 1 if at the end of the memo, 0 otherwise. --- mmrewind() rewind the current memo to the beginning. --- mmclose() close the current memo. --- mmdelete() delete and close the current memo. --- mmcount() - returns the number of records in the memo pad database.