### Revision history for ProPgCruntime

##### Additions:

**Note:** In order to make calling the C runtime functions very easy, any string type argument may be directly passed to a procedure referring to a parameter declared as 'zstring ptr'. The compiler performs itself an automatic conversion (without warning message) between any string type argument and the 'zstring ptr' type parameter.

##### Deletions:

##### Additions:

**Note:** In order to make calling the C runtime functions very easy, any string type argument may be directly passed to a procedure referring to a parameter declared as 'zstring ptr'. The compiler performs itself an automatic conversion (without warning message) between any string type and the 'zstring ptr' type.

##### Deletions:

##### Additions:

{{table columns="4" cellpadding="1" cells="Name;Prototype (with parameters);Include File;Comments;abs_;abs_(n as integer) as integer;stdlib.bi;Returns the absolute value (i.e. positive value);acos_;acos_(a as double) as double;math.bi;Returns the inverse cosine (angle in radians);asin_;asin_(a as double) as double;math.bi;Returns the inverse sine (angle in radians);atan_;atan_(a as double) as double;math.bi;Returns the inverse tan (angle in radians);atan2_;atan2_(y as double, x as double) as double;math.bi;Returns the inverse tan (pass the opposite as y and the adjacent as x);atoi;atoi(s as zstring ptr) as integer;stdlib.bi;Converts a character zstring of digits to a number of type integer.;atof;atof(s as zstring ptr) as double;stdlib.bi;Converts a character zstring of digits to a number of type double.;calloc;calloc(NumElts as integer, EltSiz as integer) as any ptr;stdlib.bi;Allocates memory. Returns a pointer to a buffer for an array having NumElts elements, each of size EltSiz bytes.;ceil;ceil(d as double) as double;math.bi;Returns the nearest whole number above the value passed.;clearerr;clearerr(s as FILE ptr);stdio.bi;Clears the error indicators on a file stream (read or write).;cos_;cos_(ar as double) as double;math.bi;Returns the cosine of an angle measured in radians.;cosh;cosh(x as double) as double;math.bi;Returns the hyperbolic cosine of an angle measured in radians.;div;div(num as integer, denom as integer) as div_t;stdlib.bi;Returns the quotient and remainder of a division as a structure of type div_t.;ecvt;ecvt(x as double) as zstring ptr;math.bi;Converts a number to a zstring.;exit_;exit_(status as integer);stdlib.bi;Exits a program. It will flush file buffers and closes all opened files, and run any functions called by atexit().;exp_;exp_(a as double) as double;math.bi;Returns the value of e raised to the power of the argument (Inverse to natural logarithm).;fabs;fabs(d as double) as double;math.bi;Returns the absolute value (i.e. positive value) of type double.;fclose;fclose(s as FILE ptr) as FILE ptr;stdio.bi;Closes a file. Returns 0 if successful otherwise EOF.;feof;feof(s as FILE ptr) as integer;stdio.bi;Returns value of end-of-file indicator . (0 if not eof). Indicator will clear itself but can be reset by clearerr().;ferror;ferror(s as FILE ptr) as integer;stdio.bi;Returns error indicator for a stream (0 if no error). Error indicator is reset by clearerr() or rewind().;fflush;fflush(s as FILE ptr) as integer;stdio.bi;Flushes (i.e. deletes) a stream (use stdin to flush the stream from the keyboard). Returns 0 if successful.;fgetc;fgetc(s as FILE ptr) as integer;stdio.bi;Single character input (in ASCII) from passed stream (stdin for keyboard).;fgetpos;fgetpos(s as FILE ptr, c as fpos_t ptr) as integer;stdio.bi;Saves the position of the file pointer on stream s at the location pointed to by c.;fgets;fgets(b as zstring ptr, n as integer, s as FILE ptr) as zstring ptr;stdio.bi;From the stream s reads up to n-1 characters to buffer b.;floor;floor(d as double) as double;math.bi;Returns the nearest whole number below the value passed.;fmod;fmod(x as double, y as double) as double;math.bi;Calculates the remainder of x divided by y.;fopen;fopen(file as zstring ptr, mode as zstring ptr) as FILE ptr;stdio.bi;Opens a file. Pass the DOS name of the file and a code to indicate whether for reading, writing, or appending. Codes are r for read, w for write, + for read and write, a for append and b to indicate binary.;fprintf;fprintf(s as FILE ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Prints on stream s as many items as there are single % signs in fmt that have matching arguments in the list.;fputc;fputc(c as integer, s as FILE ptr) as integer;stdio.bi;Outputs the single character c to the stream s.;fputs;fputs(b as zstring ptr, s as FILE ptr) as integer;stdio.bi;Sends the character stream in b to stream s, returns 0 if the operation fails.;fread;fread(buf as any ptr, b as size_t, c as size_t, s as FILE ptr) as integer;stdio.bi;Reads the number c items of data of size b bytes from file s to the buffer buf. Returns the number of data items actually read.;free;free(p as any ptr);stdlib.bi;Frees the memory allocation for a pointer p to enable this memory to be used.;freopen;freopen(file as zstring ptr, mode as zstring ptr, s as FILE ptr) as FILE ptr;stdio.bi;Opens a file for redirecting a stream. e.g. freopen("myfile", "w", stdout) will redirect the standard output to the opened "myfile".;frexp;frexp(x as double, p as integer ptr) as double;math.bi;Calculates a value m so that x equals m times 2 to some power. p is a pointer to m.;fscanf;fscanf(s as FILE ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Reads from stream s as many items as there are % signs in fmt with corresponding listed pointers.;fseek;fseek(s as FILE ptr, offset as integer, origin as integer) as integer;stdio.bi;Locates a file pointer. With origin 0, 1 or 2 for the beginning, offset bytes into and at the end of the stream.;fsetpos;fsetpos(s as FILE ptr, p as fpos_t ptr) as integer;stdio.bi;Sets the file pointer for the stream s to the value pointed to by p.;ftell;ftell(s as FILE ptr) as long;stdio.bi;Locates the position of the file pointer for the stream s.;fwrite;fwrite(buf as any ptr, b as integer, c as integer, s as FILE ptr) as integer;stdio.bi;Writes the number c items of data of size b bytes from the buffer buf to the file s. Returns the number of data items actually written.;getc;getc(s as FILE ptr) as integer;stdio.bi;Macro for single character input (in ASCII) from passed stream. (stdin for keyboard);getchar;getchar() as integer;stdio.bi;Single character input from the standard input;gets;gets(b as zstring ptr) as zstring ptr;stdio.bi;Reads a stream of characters from the standard input until it meets \n or EOF.;hypot;hypot(x as double, y as double) as double;math.bi;Calculates the hypotenuse from the sides x and y.;isalnum;isalnum(c as integer) as integer;ctype.bi;Returns a non zero value if character c is alphabetic or a digit.;isalpha;isalpha(c as integer) as integer;ctype.bi;Returns a non zero value if character c is alphabetic.;iscntrl;iscntrl(c as integer) as integer;ctype.bi;Returns a non zero value if character c is a control character.;isdigit;isdigit(c as integer) as integer;ctype.bi;Returns a non zero value if character c is a digit.;isgraph;isgraph(c as integer) as integer;ctype.bi;Returns a non zero value if character c is alphabetic.;islower;islower(c as integer) as integer;ctype.bi;Returns a non-zero value if character c is a lower case character.;isprint;isprint(c as integer) as integer;ctype.bi;Returns a non zero value if character c is printable.;ispunct;ispunct(c as integer) as integer;ctype.bi;Returns a non zero value if character c is a punctuation character.;isspace;isspace(c as integer) as integer;ctype.bi;Returns a non zero value if character c denotes a space.;isupper;isupper(c as integer) as integer;ctype.bi;Returns a non-zero value if character c is an upper case character.;isxdigit;isxdigit(c as integer) as integer;ctype.bi;Returns a non-zero value if character c is a hex digit (0 to F or f).;ldexp;ldexp(x as double, n as integer) as double;math.bi;Returns the product of x and 2 to the power n.;ldiv;ldiv(num as long, denom as long) as ldiv_t;stdlib.bi;Returns the quotient and remainder of a division as a structure of type ldiv_t.;log_;log_(a as double) as double;math.bi;Returns the natural logarithm of the argument.;log10;log10(a as double) as double;math.bi;Returns the logarithm to the base 10 of the argument.;malloc;malloc(bytes as integer) as any ptr;stdlib.bi;Allocates memory. Returns a pointer to a buffer comprising storage for the specified size.;modf;modf(d as double, p as double ptr) as double;math.bi;Returns the fractional part of a floating point number d. p points to the integral part expressed as a float.;perror;perror(mess as zstring ptr);stdio.bi;Prints on the stream stderr a message passed as the argument.;pow;pow(x as double, y as double) as double;math.bi;Returns x to the power y.;pow10;pow10(x as double) as double;math.bi;Returns 10 to the power x (inverse function to log10()).;printf;printf(fmt as zstring ptr, ...) as integer;stdio.bi;Prints on standard output as many items as there are single % signs in fmt with matching arguments in the list.;putc;putc(c as integer, s as FILE ptr) as integer;stdio.bi;Macro to output the single character c to the stream s.;putchar;putchar(c as integer) as integer;stdio.bi;Macro to output the single character c to the standard output.;puts;puts(b as zstring ptr) as integer;stdio.bi;Sends the character stream in b to the standard output, returns 0 if operation fails.;rand;rand() as integer;stdlib.bi;Returns a pseudo random number. A seed is required. The seed is set with srand.;realloc;realloc(p as any ptr, newsize as size_t) as any ptr;stdlib.bi;Allocates memory. Returns a pointer to a buffer for a change in size of object pointed to by p.;rewind;rewind(s as FILE ptr);stdio.bi;Clears the error indicators on a file stream (read or write). Necessary before reading an amended file.;scanf;scanf(fmt as zstring ptr, ...) as integer;stdio.bi;Reads from standard input as many items as there are % signs in fmt with corresponding listed pointers.;sin_;sin_(ar as double) as double;math.bi;Returns the sine of an angle measured in radians.;sinh;sinh(x as double) as double;math.bi;Returns the hyperbolic sine of an angle measured in radians.;sprintf;sprintf(p as zstring ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Prints on zstring p as many items as there are single % signs in fmt that have matching arguments in the list.;sqrt;sqrt(a as double) as double;math.bi;Returns the square root of the value passed. Domain error if value is negative.;srand;srand(seed as uinteger);stdlib.bi;Sets the seed for a random number. A possible seed is the current time.;sscanf;sscanf(b as zstring ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Reads from buffer b as many items as there are % signs in fmt with corresponding listed pointers.;strcat;strcat(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Concatenates (appends) zstring s2 to s1.;strchr;strchr(s as zstring ptr, c as integer) as zstring ptr;string.bi;Returns a pointer to the first occurrence of c in s or NULL if it fails to find one.;strcmp;strcmp(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Compares zstring s2 to s1. Returns 0 or signed difference in ASCII values of first non matching character.;strcpy;strcpy(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Copies s2 into s1.;strcspn;strcspn(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Returns the number of characters in s1 encountered before meeting any of the characters in s2.;strerror;strerror(n as integer) as zstring ptr;string.bi;Returns a pointer to a system error message corresponding to the passed error number.;strlen;strlen(s as zstring ptr) as integer;string.bi;Returns the number of bytes in the null terminated zstring pointed to by s (does not count null).;strncat;strncat(s1 as zstring ptr, s2 as zstring ptr, n as integer) as zstring ptr;string.bi;Concatenates (appends) n bytes from zstring s2 to s1.;strncmp;strncmp(s1 as zstring ptr, s2 as any ptr, n as integer) as integer;string.bi;Compares n bytes of zstring s2 to the same of s1. Returns 0 or signed difference in ASCII values of first non matching character.;strncpy;strncpy(s1 as zstring ptr, s2 as zstring ptr, n as integer) as zstring ptr;string.bi;Copies n bytes from s2 into s1.;strpbrk;strpbrk(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Returns a pointer to the first character encountered in s1 that is also in s2.;strrchr;strrchr(s as zstring ptr, c as integer) as zstring ptr;string.bi;Returns a pointer to the last occurrence of c in s or NULL if it fails to find one.;strspn;strspn(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Returns the number of characters in s1 encountered before meeting a character which is not in s2.;strstr;strstr(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Finds the location of the zstring s2 in s1 and returns a pointer to its leading character.;strtod;strtod(s as zstring ptr, p as zstring ptr) as double;stdlib.bi;Converts a zstring to double, provided the zstring is written in the form of a number.;strtok;strtok(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Returns pointers to successive tokens utilizing the zstring s1. Tokens regarded as separators are listed in s2.;system;system(command as zstring ptr) as integer;stdlib.bi;Executes, from within a program, a command addressed to the operating system written as a zstring (e.g. DIR on Windows and DOS and LS on Linux).;tan_;tan_(ar as double) as double;math.bi;Returns the tangent of an angle measured in radians.;tanh;tanh(x as double) as double;math.bi;Returns the hyperbolic tangent of an angle measured in radians.;tolower;tolower(c as integer) as integer;ctype.bi;Converts a character from upper case to lower case (uses ASCII code).;toupper;toupper(c as integer) as integer;ctype.bi;Converts a character from lower case to upper case (uses ASCII code).;ungetc;ungetc(c as integer, s as FILE ptr) as integer;stdio.bi;Pushes a character c back into the stream s, returns EOF if unsuccessful. Do not push more than one character."}}

##### Deletions:

##### Additions:

##### Additions:

The Include File column contains the name of the file which you must include, using the ##[[KeyPgInclude|#include]]## directive at the beginning of your program. If you don't include the appropriate include file, the program either will not compile, or it will compile apparently correctly but give incorrect results when run. All of the C Runtime headers are located in the ##crt## directory; for example, if the specified header is ##math.bi##, use ###include "crt/math.bi"## or ###include "crt\math.bi"##, our just ###include "crt.bi"## including all the others.

**Note:** The //compare// callback function required by ##bsearch## and ##qsort## must be declared as ##[[KeyPgCdecl|cdecl]]##. It must return a value <0 if its first argument should be located before the second one in the sorted array, >0 if the first argument should be located after the second one, and zero if their relative positions are indifferent (equal values).

- ##[[KeyPgInclude|#include]]##

**Note:** The //compare// callback function required by ##bsearch## and ##qsort## must be declared as ##[[KeyPgCdecl|cdecl]]##. It must return a value <0 if its first argument should be located before the second one in the sorted array, >0 if the first argument should be located after the second one, and zero if their relative positions are indifferent (equal values).

- ##[[KeyPgInclude|#include]]##

##### Deletions:

**Note:** The //compare// callback function required by ##bsearch## and ##qsort## must be declared as ##[[KeyPgCdecl cdecl]]##. It must return a value <0 if its first argument should be located before the second one in the sorted array, >0 if the first argument should be located after the second one, and zero if their relative positions are indifferent (equal values).

- ##[[KeyPgInclude #include]]##

#### Revision [16642]

Edited on 2013-03-05 16:38:18 by DkLwikki [rand() returns at least 0 to 32767, not 0 to 32]##### Additions:

{{table columns="2" cellpadding="1" cells="Prototype (with parameters);Comments;abs_(n as integer) as integer;Get absolute value of an integer.;acos_(x as double) as double;Compute arc cosine of x.;asin_(x as double) as double;Compute arc sine of x.;atan_(x as double) as double;Compute arc tangent of x.;atan2_(y as double, x as double) as double;Compute arc tangent of y/x.;ceil(x as double) as double;Get smallest integral value that exceeds x.;cos_(x as double) as double;Compute cosine of angle in radians.;cosh(x as double) as double;Compute the hyperbolic cosine of x.;div(number as integer, denom as integer) as div_t;Divide one integer by another.;exp_(x as double) as double;Compute exponential of x.;fabs(x as double) as double;Compute absolute value of x.;floor(x as double) as double;Get largest integral value less than x.;fmod(x as double, y as double) as double;Divide x by y with integral quotient and return remainder.;frexp(x as double, expptr as integer ptr) as double;Breaks down x into mantissa and exponent of no.;labs(n as long) as long;Find absolute value of long integer n.;ldexp(x as double, exp as integer) as double;Reconstructs x out of mantissa and exponent of two.;ldiv(number as long, denom as long) as ldiv_t;Divide one long integer by another.;log_(x as double) as double;Compute log(x).;log10(x as double) as double;Compute log to the base 10 of x.;modf(x as double, intptr as double ptr) as double;Breaks x into fractional and integer parts.;pow(x as double, y as double) as double;Compute x raised to the power y.;rand() as integer;Get a random integer between 0 and 32767.;random(max_num as integer) as integer;Get a random integer between 0 and max_num.;randomize();Set a random seed for the random number generator.;sin_(x as double) as double;Compute sine of angle in radians.;sinh(x as double) as double;Compute the hyperbolic sine of x.;sqrt(x as double) as double;Compute the square root of x.;srand(seed as uinteger);Set a new seed for the random number generator (rand).;tan_(x as double) as double;Compute tangent of angle in radians.;tanh(x as double) as double;Compute the hyperbolic tangent of x."}}

##### Deletions:

##### Additions:

The Comments column contains a very brief description of the use of the function. The list is not complete, however it provides information on the major functions in the C Runtime Library. It should, at the very least, indicate what functions are available in the standard C library allow you to do more investigation on your own. Some of the C library functions documented elsewhere may not be available in ""FreeBASIC"". Check the appropriate include file for more information.

**Note:** The following prototypes are not the official ""FreeBASIC"" prototypes (see the include files), however, they will give you enough information to properly use the functions.

The Include File column contains the name of the file which you must include, using the ##[[KeyPgInclude #include]]## directive at the beginning of your program. If you don't include the appropriate include file, the program either will not compile, or it will compile apparently correctly but give incorrect results when run. All of the C Runtime headers are located in the ##crt## directory; for example, if the specified header is ##math.bi##, use ###include "crt/math.bi"## or ###include "crt\math.bi"##, our just ###include "crt.bi"## including all the others.

**Note:** The following prototypes are not the official ""FreeBASIC"" prototypes (see the include files), however, they will give you enough information to properly use the functions.

The Include File column contains the name of the file which you must include, using the ##[[KeyPgInclude #include]]## directive at the beginning of your program. If you don't include the appropriate include file, the program either will not compile, or it will compile apparently correctly but give incorrect results when run. All of the C Runtime headers are located in the ##crt## directory; for example, if the specified header is ##math.bi##, use ###include "crt/math.bi"## or ###include "crt\math.bi"##, our just ###include "crt.bi"## including all the others.

##### Deletions:

**Note:** The following prototypes are not the official FreeBASIC prototypes (see the include files), however, they will give you enough information to properly use the functions.

The Include File column contains the name of the file which you must include, using the ##[[KeyPgInclude #include]]## directive at the beginning of your program. If you don't include the appropriate include file, the program either will not compile, or it will compile apparently correctly but give incorrect results when run. All of the C Runtime headers are located in the ##crt## directory; for example, if the specified header is ##math.bi##, use ##include "crt/math.bi"## or ##include "crt\math.bi"##, our just ##include "crt.bi"## including all the others.

#### Revision [16165]

Edited on 2012-05-03 07:33:59 by FxMwikki [Auto compiler conversion between string argument and 'Zstring Ptr' parameter when calling procedure]##### Additions:

**Note:** In order to make calling the C runtime functions very easy, any string type argument may be directly passed to a procedure referring to a parameter declared as 'zstring ptr'. The compiler performs itself an automatic conversion (without warning message) between string and 'zstring ptr'.

##### Deletions:

#### Revision [16164]

Edited on 2012-05-03 06:55:03 by FxMwikki [Automatic compiler conversion between 'String' argument and 'Zstring Ptr' parameter when calling pro]##### Additions:

**Note:** In order to make calling the C runtime functions very easy, a 'string' argument may be directly passed to a procedure referring to a parameter declared as 'zstring ptr'. The compiler performs itself an automatic conversion (without warning message) between 'string' and 'zstring ptr'.

##### Additions:

{{table columns="4" cellpadding="1" cells="Name;Prototype (with parameters);Include File;Comments;abs_;abs_(n as integer) as integer;stdlib.bi;Returns the absolute value (i.e. positive value);acos_;acos_(a as double) as double;math.bi;Returns the inverse cosine (angle in radians);asin_;asin_(a as double) as double;math.bi;Returns the inverse sine (angle in radians);atan_;atan_(a as double) as double;math.bi;Returns the inverse tan (angle in radians);atan2_;atan2_(y as double, x as double) as double;math.bi;Returns the inverse tan (pass the opposite as y and the adjacent as x);atoi;atoi(s as zstring ptr) as integer;stdlib.bi;Converts a character zstring of digits to a number of type integer.;atof;atof(s as zstring ptr) as double;stdlib.bi;Converts a character zstring of digits to a number of type double.;calloc;calloc(NumElts as integer, EltSiz as integer) as any ptr;stdlib.bi;Allocates memory. Returns a pointer to a buffer for an array having NumElts elements, each of size EltSiz bytes.;ceil;ceil(d as double) as double;math.bi;Returns the nearest whole number above the value passed.;clearerr;clearerr(s as FILE ptr);stdio.bi;Clears the error indicators on a file stream (read or write).;cos_;cos_(ar as double) as double;math.bi;Returns the cosine of an angle measured in radians.;cosh;cosh(x as double) as double;math.bi;Returns the hyperbolic cosine of an angle measured in radians.;div;div(num as integer, denom as integer) as div_t;stdlib.bi;Returns the quotient and remainder of a division as a structure of type div_t.;ecvt;ecvt(x as double) as zstring ptr;math.bi;Converts a number to a zstring.;exit_;exit_(status as integer);stdlib.bi;Exits a program. It will flush file buffers and closes all opened files, and run any functions called by atexit().;exp_;exp_(a as double) as double;math.bi;Returns the value of e raised to the power of the argument (Inverse to natural logarithm).;fabs;fabs(d as double) as double;math.bi;Returns the absolute value (i.e. positive value) of type double.;fclose;fclose(s as FILE ptr) as FILE ptr;stdio.bi;Closes a file. Returns 0 if successful otherwise EOF.;feof;feof(s as FILE ptr) as integer;stdio.bi;Returns value of end-of-file indicator . (0 if not eof). Indicator will clear itself but can be reset by clearerr().;ferror;ferror(s as FILE ptr) as integer;stdio.bi;Returns error indicator for a stream (0 if no error). Error indicator is reset by clearerr() or rewind().;fflush;fflush(s as FILE ptr) as integer;stdio.bi;Flushes (i.e. deletes) a stream (use stdin to flush the stream from the keyboard). Returns 0 if successful.;fgetc;fgetc(s as FILE ptr) as integer;stdio.bi;Single character input (in ASCII) from passed stream (stdin for keyboard).;fgetpos;fgetpos(s as FILE ptr, c as fpos_t ptr) as integer;stdio.bi;Saves the position of the file pointer on stream s at the location pointed to by c.;fgets;fgets(b as zstring ptr, n as integer, s as FILE ptr) as zstring ptr;stdio.bi;From the stream s reads up to n-1 characters to buffer b.;floor;floor(d as double) as double;math.bi;Returns the nearest whole number below the value passed.;fmod;fmod(x as double, y as double) as double;math.bi;Calculates the remainder of x divided by y.;fopen;fopen(file as zstring ptr, mode as zstring ptr) as FILE ptr;stdio.bi;Opens a file. Pass the DOS name of the file and a code to indicate whether for reading, writing, or appending. Codes are r for read, w for write, + for read and write, a for append and b to indicate binary.;fprintf;fprintf(s as FILE ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Prints on stream s as many items as there are single % signs in fmt that have matching arguments in the list.;fputc;fputc(c as integer, s as FILE ptr) as integer;stdio.bi;Outputs the single character c to the stream s.;fputs;fputs(b as zstring ptr, s as FILE ptr) as integer;stdio.bi;Sends the character stream in b to stream s, returns 0 if the operation fails.;fread;fread(buf as any ptr, b as size_t, c as size_t, s as FILE ptr) as integer;stdio.bi;Reads the number c items of data of size b bytes from file s to the buffer buf. Returns the number of data items actually read.;free;free(p as any ptr);stdlib.bi;Frees the memory allocation for a pointer p to enable this memory to be used.;freopen;freopen(file as zstring ptr, mode as zstring ptr, s as FILE ptr) as FILE ptr;stdio.bi;Opens a file for redirecting a stream. e.g. freopen("myfile", "w", stdout) will redirect the standard output to the opened "myfile".;frexp;frexp(x as double, p as integer ptr) as double;math.bi;Calculates a value m so that x equals m times 2 to some power. p is a pointer to m.;fscanf;fscanf(s as FILE ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Reads from stream s as many items as there are % signs in fmt with corresponding listed pointers.;fseek;fseek(s as FILE ptr, offset as integer, origin as integer) as integer;stdio.bi;Locates a file pointer. With origin 0, 1 or 2 for the beginning, offset bytes into and at the end of the stream.;fsetpos;fsetpos(s as FILE ptr, p as fpos_t ptr) as integer;stdio.bi;Sets the file pointer for the stream s to the value pointed to by p.;ftell;ftell(s as FILE ptr) as long;stdio.bi;Locates the position of the file pointer for the stream s.;fwrite;fwrite(buf as any ptr, b as integer, c as integer, s as FILE ptr) as integer;stdio.bi;Writes the number c items of data of size b bytes from the buffer buf to the file s. Returns the number of data items actually written.;getc;getc(s as FILE ptr) as integer;stdio.bi;Macro for single character input (in ASCII) from passed stream. (stdin for keyboard);getchar;getchar() as integer;stdio.bi;Single character input from the standard input;gets;gets(b as zstring ptr) as zstring ptr;stdio.bi;Reads a stream of characters from the standard input until it meets \n or EOF.;hypot;hypot(x as double, y as double) as double;math.bi;Calculates the hypotenuse from the sides x and y.;isalnum;isalnum(c as integer) as integer;ctype.bi;Returns a non zero value if character c is alphabetic or a digit.;isalpha;isalpha(c as integer) as integer;ctype.bi;Returns a non zero value if character c is alphabetic.;iscntrl;iscntrl(c as integer) as integer;ctype.bi;Returns a non zero value if character c is a control character.;isdigit;isdigit(c as integer) as integer;ctype.bi;Returns a non zero value if character c is a digit.;isgraph;isgraph(c as integer) as integer;ctype.bi;Returns a non zero value if character c is alphabetic.;islower;islower(c as integer) as integer;ctype.bi;Returns a non-zero value if character c is a lower case character.;isprint;isprint(c as integer) as integer;ctype.bi;Returns a non zero value if character c is printable.;ispunct;ispunct(c as integer) as integer;ctype.bi;Returns a non zero value if character c is a punctuation character.;isspace;isspace(c as integer) as integer;ctype.bi;Returns a non zero value if character c denotes a space.;isupper;isupper(c as integer) as integer;ctype.bi;Returns a non-zero value if character c is an upper case character.;isxdigit;isxdigit(c as integer) as integer;ctype.bi;Returns a non-zero value if character c is a hex digit (0 to F or f).;ldexp;ldexp(x as double, n as integer) as double;math.bi;Returns the product of x and 2 to the power n.;ldiv;ldiv(num as long, denom as long) as ldiv_t;stdlib.bi;Returns the quotient and remainder of a division as a structure of type ldiv_t.;log_;log_(a as double) as double;math.bi;Returns the natural logarithm of the argument.;log10;log10(a as double) as double;math.bi;Returns the logarithm to the base 10 of the argument.;malloc;malloc(bytes as integer) as any ptr;stdlib.bi;Allocates memory. Returns a pointer to a buffer comprising storage for the specified size.;modf;modf(d as double, p as double ptr) as double;math.bi;Returns the fractional part of a floating point number d. p points to the integral part expressed as a float.;perror;perror(mess as zstring ptr);stdio.bi;Prints on the stream stderr a message passed as the argument.;pow;pow(x as double, y as double) as double;math.bi;Returns x to the power y.;pow10;pow10(x as double) as double;math.bi;Returns 10 to the power x (inverse function to log10()).;printf;printf(fmt as zstring ptr, ...) as integer;stdio.bi;Prints on standard output as many items as there are single % signs in fmt with matching arguments in the list.;putc;putc(c as integer, s as FILE ptr) as integer;stdio.bi;Macro to output the single character c to the stream s.;putchar;putchar(c as integer) as integer;stdio.bi;Macro to output the single character c to the standard output.;puts;puts(b as zstring ptr) as integer;stdio.bi;Sends the character stream in b to the standard output, returns 0 if operation fails.;rand;rand() as integer;stdlib.bi;Returns a pseudo random number. A seed is required. The seed is set with srand.;realloc;realloc(p as any ptr, newsize as size_t) as any ptr;stdlib.bi;Allocates memory. Returns a pointer to a buffer for a change in size of object pointed to by p.;rewind;rewind(s as FILE ptr);stdio.bi;Clears the error indicators on a file stream (read or write). Necessary before reading an amended file.;scanf;scanf(fmt as zstring ptr, ...) as integer;stdio.bi;Reads from standard input as many items as there are % signs in fmt with corresponding listed pointers.;sin_;sin_(ar as double) as double;math.bi;Returns the sine of an angle measured in radians.;sinh;sinh(x as double) as double;math.bi;Returns the hyperbolic sine of an angle measured in radians.;sprintf;sprintf(p as zstring ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Prints on zstring p as many items as there are single % signs in fmt that have matching arguments in the list.;sqrt;sqrt(a as double) as double;math.bi;Returns the square root of the value passed. Domain error if value is negative.;srand;srand(seed as uinteger);stdlib.bi;Sets the seed for a random number. A possible seed is the current time.;sscanf;sscanf(b as zstring ptr, fmt as zstring ptr, ...) as integer;stdio.bi;Reads from buffer b as many items as there are % signs in fmt with corresponding listed pointers.;strcat;strcat(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Concatenates (appends) zstring s2 to s1.;strchr;strchr(s as zstring ptr, c as integer) as zstring ptr;string.bi;Returns a pointer to the first occurrence of c in s or NULL if it fails to find one.;strcmp;strcmp(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Compares zstring s2 to s1. Returns 0 or signed difference in ASCII values of first non matching character.;strcpy;strcpy(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Copies s2 into s1.;strcspn;strcspn(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Returns the number of characters in s1 encountered before meeting any of the characters in s2.;strerror;strerror(n as integer) as zstring ptr;string.bi;Returns a pointer to a system error message corresponding to the passed error number.;strlen;strlen(s as zstring ptr) as integer;string.bi;Returns the number of bytes in the null terminated zstring pointed to by s (does not count null).;strncat;strncat(s1 as zstring ptr, s2 as zstring ptr, n as integer) as zstring ptr;string.bi;Concatenates (appends) n bytes from zstring s2 to s1.;strncmp;strncmp(s1 as zstring ptr, s2 as any ptr, n as integer) as integer;string.bi;Compares n bytes of zstring s2 to the same of s1. Returns 0 or signed difference in ASCII values of first non matching character.;strncpy;strncpy(s1 as zstring ptr, s2 as zstring ptr, n as integer) as zstring ptr;string.bi;Copies n bytes from s2 into s1.;strpbrk;strpbrk(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Returns a pointer to the first character encountered in s1 that is also in s2.;strrchr;strrchr(s as zstring ptr, c as integer) as zstring ptr;string.bi;Returns a pointer to the last occurrence of c in s or NULL if it fails to find one.;strspn;strspn(s1 as zstring ptr, s2 as zstring ptr) as integer;string.bi;Returns the number of characters in s1 encountered before meeting a character which is not in s2.;strstr;strstr(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Finds the location of the zstring s2 in s1 and returns a pointer to its leading character.;strtod;strtod(s as zstring ptr, p as zstring ptr) as double;stdlib.bi;Converts a zstring to double, provided the zstring is written in the form of a number.;strtok;strtok(s1 as zstring ptr, s2 as zstring ptr) as zstring ptr;string.bi;Returns pointers to successive tokens utilizing the zstring s1. Tokens regarded as separators are listed in s2.;system;system(command as zstring ptr) as integer;stdlib.bi;Executes, from within a program, a command addressed to the operating system written as a zstring (e.g. DIR on Windows and DOS and LS on Linux).;tan_;tan_(ar as double) as double;math.bi;Returns the tangent of an angle measured in radians.;tanh;tanh(x as double) as double;math.bi;Returns the hyperbolic tangent of an angle measured in radians.;tolower;tolower(c as integer) as integer;ctype.bi;Converts a character from upper case to lower case (uses ASCII code).;toupper;toupper(c as integer) as integer;ctype.bi;Converts a character from lower case to upper case (uses ASCII code).;ungetc;ungetc(c as integer, s as FILE ptr) as integer;stdio.bi;Pushes a character c back into the stream s, returns EOF if unsuccessful. Do not push more than one character."}}