|
|
#51 |
|
Registrierter Benutzer
|
In der anhängenden Datei findet Ihr ein kleines Beispielprogramm für ein 'Nicht-OA-Menü'. Darin kann dann auch die Leertaste benutzt werden.
Heinz |
|
|
|
|
|
#52 |
|
Entwickler
|
Dank Alfred gibt es jetzt auch die Hints+Tips Datenbank von Malcolm Smith zum Stöbern:
http://www.waldbauer.com/tmp/tips.php |
|
|
|
|
|
#53 |
|
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)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" |
|
|
|
|
|
#54 |
|
Moderator
|
OISALPHA
E r g e b n i s / R e s u l t
The routine returns true if c is a particular representation of an alphabetic character. B e s c h r e i b u n g / D e s c r i p t i o n OISALPHA returns a TRUE if c is within the ranges A – Z or a – z. The routine returns FALSE if c does not satisfy the test condition. S y n t a x Code:
value = call ('OISALPHA' , c)c - Character to test R e t u r n s TRUE, if the character is alphabetic, FALSE otherwise B e i s p i e l / E x a m p l e Code:
attach 'CTYPE'
put call ('OISALPHA' , 'A') ! returns true, as it's alphabetic
put call ('OISALPHA' , '9') ! returns false, as it's not alphabetic
detach 'CTYPE' |
|
|
|
|
|
#55 |
|
Moderator
|
OISASCII
E r g e b n i s / R e s u l t
The routine returns true if c is a particular representation of an ASCII character. B e s c h r e i b u n g / D e s c r i p t i o n OISASCII returns a TRUE if c is an ASCII character (in the range 0x00 – 0x7F). The routine returns FALSE if c does not satisfy the test condition. S y n t a x Code:
value = call ('OISASCII' , c)c - Character to test R e t u r n s TRUE, if the character is an ASCII character, FALSE otherwise B e i s p i e l / E x a m p l e Code:
attach 'CTYPE'
put call ('OISASCII' , 'A') ! returns true, as it's an ASCII character
put call ('OISASCII' , 'Ç') ! returns false, as it's not an ASCII character
detach 'CTYPE' |
|
|
|
|
|
#56 |
|
Moderator
|
OISALNUM
E r g e b n i s / R e s u l t
The routine returns true if c is a particular representation of an alphanumeric character. B e s c h r e i b u n g / D e s c r i p t i o n OISALNUM returns a TRUE if either OISALPHA or OISDIGIT is true for c, that is, if c is within the ranges A – Z, a – z, or 0 – 9. The routine returns FALSE if c does not satisfy the test condition. S y n t a x Code:
value = call ('OISALNUM' , c)c - Character to test R e t u r n s TRUE, if the character is an alphanumeric character, FALSE otherwise B e i s p i e l / E x a m p l e Code:
attach 'CTYPE'
put call ('OISALNUM' , 'A') ! returns true, as it's an alphanumeric character
put call ('OISALNUM' , '?') ! returns false, as it's not an alphanumeric character
detach 'CTYPE' |
|
|
|
|
|
#57 |
|
Moderator
|
OISCNTRL
E r g e b n i s / R e s u l t
The routine returns true if c is a particular representation of a control character. B e s c h r e i b u n g / D e s c r i p t i o n OISCNTRL returns a TRUE if c is a control character (0x00 – 0x1F or 0x7F). The routine returns FALSE if c does not satisfy the test condition. S y n t a x Code:
value = call ('OISCNTRL' , c)c - Character to test R e t u r n s TRUE, if the character is a control character, FALSE otherwise B e i s p i e l / E x a m p l e Code:
attach 'CTYPE'
put call ('OISCNTRL' , chr(13)) ! returns true, as it's a control character
put call ('OISCNTRL' , '?') ! returns false, as it's not a control character
detach 'CTYPE' |
|
|
|
|
|
#58 |
|
Moderator
|
OISDIGIT
E r g e b n i s / R e s u l t
The routine returns true if c is a particular representation of a decimal-digit character. B e s c h r e i b u n g / D e s c r i p t i o n OISDIGIT returns a TRUE if c is a decimal digit (0 – 9). The routine returns FALSE if c does not satisfy the test condition. S y n t a x Code:
value = call ('OISDIGIT' , c)c - Character to test R e t u r n s TRUE, if the character is a decimal digit, FALSE otherwise B e i s p i e l / E x a m p l e Code:
attach 'CTYPE'
put call ('OISDIGIT' , '9') ! returns true, as it's a digit
put call ('OISDIGIT' , '?') ! returns false, as it's not a digit
detach 'CTYPE' |
|
|
|
|
|
#59 |
|
Moderator
|
OISGRAPH
E r g e b n i s / R e s u l t
The routine returns true if c is a particular representation of a printable character other than a space. B e s c h r e i b u n g / D e s c r i p t i o n OISGRAPH returns a TRUE if c is a printable character other than a space. The routine returns FALSE if c does not satisfy the test condition. S y n t a x Code:
value = call ('OISGRAPH' , c)c - Character to test R e t u r n s TRUE, if the character is a printable character other than a space, FALSE otherwise. B e i s p i e l / E x a m p l e Code:
attach 'CTYPE'
put call ('OISGRAPH' , 'A') ! returns true, as it's a printable character
put call ('OISGRAPH' , 'Ç') ! returns false, as it's not a printable character
detach 'CTYPE' |
|
|
|
|
|
#60 |
|
Moderator
|
OISLOWER
E r g e b n i s / R e s u l t
The routine returns true if c is a particular representation of a lowercase character. B e s c h r e i b u n g / D e s c r i p t i o n OISLOWER returns a TRUE if c is a lowercase character (a – z). The routine returns FALSE if c does not satisfy the test condition. S y n t a x Code:
value = call ('OISLOWER' , c)c - Character to test R e t u r n s TRUE, if the character is a lowercase character, FALSE otherwise. B e i s p i e l / E x a m p l e Code:
attach 'CTYPE'
put call ('OISLOWER' , 'a') ! returns true, as it's a lowercase character
put call ('OISLOWER' , 'A') ! returns false, as it's not a lowercase character
detach 'CTYPE' |
|
|
|