[next] [previous] [contents]

  11.1.2.2 CHR$ Function
  The CHR$ function returns the character whose ASCII value
  you supply. If the ASCII integer expression that you sup-
  ply is less than zero or greater than 255, BASIC treats it as
  a modulo 256 value. BASIC treats the integer expression
  as the remainder of the actual supplied integer divided by
  256. Therefore, CHR$(325) is equivalent to CHR$(69) and
  CHR$(-1) is equivalent to CHR$(255).

  The following program outputs the character whose ASCII
  value corresponds to the input value modulo 256:
  PRINT "THIS PROGRAM FINDS THE CHARACTER WHOSE"
  PRINT "VALUE (MODULO 256) YOU TYPE"
  INPUT value%
  PRINT CHR$(value%)
  END

  Output 1
  THIS PROGRAM FINDS THE CHARACTER WHOSE
  VALUE (MODULO 256) YOU TYPE
    ? 69
  E

  Output 2
  THIS PROGRAM FINDS THE CHARACTER WHOSE
  VALUE (MODULO 256) YOU TYPE
    ? 1093
  E