/* In answer to Stephane's Amos2E questions. */ PROC main () DEF s [2] : STRING, c = "A", cChar = NIL : PTR TO CHAR, iChar = NIL : PTR TO INT, lChar = NIL : PTR TO LONG /* >> In Amos: A$=INKEY$ is to get a keyboard character. Unfortunately, Inp() *waits* for the RETURN key. If I have time maybe I'll try to work up an IDCMP thang; don't know if that would be the the best solution. Meanwhile maybe someone else can pull this one out of the air. */ /* >> Month$=Str(12) converts 12 as a string. */ StringF (s, '\d', 12) WriteF ('1) Month=\s\n', s) /* >> ASCII$=Asc(a) converts a into an ASCII value. */ WriteF ('2) Asc(c)=\d\n', c) /* >> A$=CHR$(27) convert a ASCII value into a character. */ WriteF ('3) CHR$(c)=\c\n', c) /* Characters are similar to those in C. It's how you treat them that */ /* makes the difference. Note the following awesome feature: */ c := "FRED" WriteF ('4a) 32-bit character! But be careful what you want:\n' + ' CHR$(c) = \c\n' + ' (no equiv)(c) = \d\n', c, c) /* And lastly...a little of Wouter's polymorphism. */ cChar := iChar := lChar := 'FRED' WriteF ('4b) What WriteF() thinks about 32-bit characters:\n' + ' cChar[]=\c\n' + ' iChar[]=\c\n' + ' lChar[]=\c\n', cChar[], iChar[], lChar[]) WriteF (' What E really thinks about 32-bit characters:\n' + ' cChar[]=\s, Char(cChar)=\d[10], cChar[]=\d[10]\n' + ' iChar[]=\s, Int(iChar) =\d[10], iChar[]=\d[10]\n' + ' lChar[]=\s, Long(lChar)=\d[10], lChar[]=\d[10]\n', IF cChar[] = "F" THEN 'F' ELSE '*', Char (cChar), cChar[], IF iChar[] = "FR" THEN 'FR' ELSE '*', Int (iChar), iChar[], IF lChar[] = "FRED" THEN 'FRED' ELSE '*', Long (lChar), lChar[]) /*===== >from Amos<->E like he did with C<->E it would be very usefull. And I need the >commands how to get or put values from gadtools gadgets. Sorry, Stephane. KS1.3 is too dumb for gadtools :( I got carried away, so you got more than you asked for. Hope I answered your other questions thoroughly. Later. -- Barry