[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-------+##################################################################
#+-| CHR() |--------------------------------+#################################
#| +-------+ Converts a byte to a character |#################################
#+------------------------------------------+#################################
##############################################################################
##############################################################################
#+--| Summary |----------------+##############################################
#| #INCLUDE string.hdr |##############################################
#+-----------------------------+##############################################
##############################################################################
##############################################################################
#+--| Syntax |--------------------------------+###############################
#| FUNCTION CHAR chr PROTOTYPE |###############################
#| PARAMETERS VALUE UINT input_value |###############################
#+--------------------------------------------+###############################
##############################################################################
##############################################################################
####+---| Description |--------------------------------------------------+####
####| The chr() function returns a character string of length 1 with the |####
####| character derived from the ASCII value of input_value. |####
####| ------------------------------------------------------------------ |####
####| To manipulate ASCII 0, use the fb_read() and fb_write() functions. |####
####| Through fb_write() an ASCII 0 can be sent to a printer. |####
####+--------------------------------------------------------------------+####
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Sound an alert if there is a printer error. |#########
#########| |#########
#########| IF .NOT. pready() |#########
#########| ? chr(7) && Sound the bell |#########
#########| ? "printer not ready..." |#########
#########| ENDIF |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Print out an ASCII table |#########
#########| |#########
#########| STORE 0 to r,c |#########
#########| FOR i = 0 TO 255 |#########
#########| @ r,c SAY chr( i ) |#########
#########| c = c + 1 |#########
#########| IF c >=80 |#########
#########| c = 0 |#########
#########| r = r + 1 |#########
#########| ENDIF |#########
#########| NEXT |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
asc()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson