home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / SIMTEL / CPMUG / CPMUG031.ARK / TBASIC.10 < prev    next >
Text File  |  1984-04-29  |  2KB  |  68 lines

  1.         INTRINSIC (BUILT-IN) FUNCTIONS
  2.  
  3. A FUNCTION, built-in or otherwise, can be used anywhere that
  4. an expression can be used.  It can be a part of an expression,
  5. and it can have an expression as it's argument.  It returns a
  6. single value, which is defined by the descriptions below.
  7. Some functions return string values, and some return numeric ones.
  8.  
  9. ABS(<numeric expression>)
  10. Returns the absolute value of <numeric expression>.  In other words,
  11. the expression is evaluated;  if the result is minus, the minus
  12. sign is removed to make it positive.
  13. Examples:  ABS(X-5*SIN(Y))    ABS(B^2-4*A*C)
  14.  
  15. ASC(<string expression>)
  16. Returns the ASCII code of the first character of <string expression>.
  17. (i.e. the number which corresponds with the ASCII character)
  18. Examples:  ASC("A")    ASC(ANS$)    ASC(A$(N))
  19.  
  20. ATN(<numeric expression>)
  21. Returns the arctangent of <numeric expression>, which is in radians.
  22. Examples:  ATN(RADIANS)    ATN(DEGREES*PI/180)    ATN(.053)
  23.  
  24. * CALL(<numeric expression>,<numeric expression>)
  25. Calls a machine language subroutine at the address indicated by
  26. the first <numeric expression>, with the value of the second
  27. <numeric expression> in registers D&E.  The CALL function
  28. evaluates to the number which is returned in registers D&E.
  29. Example:   PRINT CALL(PLOT,X)
  30.  
  31. CHR$(<numeric expression>)
  32. Returns a single character string whose ASCII code is <numeric expression>.
  33. Examples:  CHR$(7)    CHR$(48+NUM)    CHR$(CONTROL)
  34.  
  35. COS(<numeric expression>)
  36. Returns the cosine of the angle <numeric expression>, which
  37. is in radians.  Example:  COS(DEG*3.14159/180)
  38.  
  39. EXP(<numeric expression>)
  40. Returns the constant e (2.718282) to the <numeric expression> power.
  41. Examples:  EXP(1)    EXP(0)    EXP(X+Y*2)
  42.  
  43. FRE(<expression>)
  44. Returns the amount of free (unused) space in memory.
  45. Examples:  FRE("")    FRE(0)    FRE(1)
  46.  
  47. * HEX(<hexadecimal string>)
  48. Returns the decimal equivalent of the <hexadecimal string>.
  49. Examples:   LET ADDR=HEX(HADDR)    FOR N=0 TO HEX(A)
  50.  
  51. * HEX$(<numeric expression>)
  52. Returns the hexadecimal string representation of the decimal
  53. value of <numeric expression>.
  54. Examples:   PRINT HEX$(ADR+OFFSET)   PRINT HEX$(N)
  55.  
  56.  
  57.  
  58.                9
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.