Einzelnen Beitrag anzeigen
Alt 09.10.2012, 20:34   #53
leecher
Moderator
OSA ASC

E r g e b n i s / R e s u l t

Language Call Application (and source) to convert a character to the ASCII number equivalent.

B e s c h r e i b u n g / D e s c r i p t i o n

This application will return (as an integer) the ASCII number
equivalent of a character (it is the opposite to the CHR function).
It is designed to be used within Programmer/Compiler but could be 'built'
to be used from other facilities.

S y n t a x

Code:
value = call ('ASC' , character)
P a r a m e t e r

character - Character, whose ASCII value you want to get

R e t u r n s

An integert representing the ASCII value of the character supplied.

B e i s p i e l / E x a m p l e

Code:
attach "asc.oac"
counter = 1 
charin = "A"
while counter < 10 
   asciinum = call("asc",charin)
   put column 10 asciinum, column 15 charin, do newline 
   asciinum = asciinum + 1
   charin = chr(asciinum) 
   counter = counter + 1
end while 
b=true;get b 
detach "asc.oac"
Angehängte Dateien
Dateityp: oac ASC.OAC‎ (13.0 KB, 3x aufgerufen)
Dateityp: zip asc.zip‎ (13.6 KB, 2x aufgerufen)
leecher ist offline   Mit Zitat antworten