Thread View: comp.lang.logo
2 messages
2 total messages
Started by John Savage
Tue, 06 Oct 1992 08:16
HELP WANTED: LSRHS version of LOGO (DOSLOGO)
Author: John Savage
Date: Tue, 06 Oct 1992 08:16
Date: Tue, 06 Oct 1992 08:16
28 lines
1794 bytes
1794 bytes
I would like to hear from anyone running the LSRHS LOGO, so I can compare notes on some mysterious behaviour I have found in the version I downloaded from cher.media.mit.edu as DOSLOGO. Specifically, I found that PRINT RANDOM 10000 works reliably, but PRINT RANDOM 32767 works only about one time out of every five times I execute it. (32767 is the largest positive integer for 16 bits). Some integer arguments are not accepted at all - I can live with that, but I would like the largest range of random numbers, so why does RANDOM 32767 run only erratically?? Furthur, the ASCII function is strange. To return the ASCII value of the character "0", one should use PRINT ASCII "0 , but this returns a number cycling through this set, one value at a time, every time it is run: 232 232 124 124 90 90 158 1158 28 28 !!! None of these is correct. To get the correct answer, I can use PRINT ASCII 0 ; but this cannot be extended to finding the ASCII value of "D", etc. Apart from these oddities, I like it. ----------------------------------- John Savage School of Maths, Physics, Computing & Electronics, Macquarie Univerity. Sydney. Australia. email: johns@macadam.mpce.mq.edu.au -----------------------------------
Re: HELP WANTED: LSRHS version of LOGO (DOSLOGO)
Author: George Mills
Date: Tue, 06 Oct 1992 19:44
Date: Tue, 06 Oct 1992 19:44
49 lines
2429 bytes
2429 bytes
johns@macadam.mpce.mq.edu.au (John Savage) writes: >I would like to hear from anyone running the LSRHS LOGO, so I can compare >notes on some mysterious behaviour I have found in the version I downloaded >from cher.media.mit.edu as DOSLOGO. >Specifically, I found that PRINT RANDOM 10000 works reliably, but >PRINT RANDOM 32767 works only about one time out of every five times I >execute it. (32767 is the largest positive integer for 16 bits). Some >integer arguments are not accepted at all - I can live with that, but I >would like the largest range of random numbers, so why does RANDOM 32767 >run only erratically?? I'm not sure what's going on here. I will probably not fix it but I may give an answer or a work around. My only interest is for MswLogo and it turns out rnd crashes it (ouch). Thanks for reporting this. Note the source is availble for DosLogo. >Furthur, the ASCII function is strange. >To return the ASCII value of the character "0", one should use >PRINT ASCII "0 , but this returns a number cycling through this set, one >value at a time, every time it is run: >232 232 124 124 90 90 158 1158 28 28 !!! None of these is correct. >To get the correct answer, I can use PRINT ASCII 0 ; but this cannot >be extended to finding the ASCII value of "D", etc. Try this, make "letter "a ascii :letter make "letter "b ascii :letter There does seem to be a problem with using ascii directly, this should work around it and you can you can probably write a logo routine yourself (e.g. myascii) to fix it). For some reason it does works on MswLogo (Same exact code). Interestingly the Ascii command is not documented anywhere? How did you know it existed? >Apart from these oddities, I like it. >----------------------------------- >John Savage >School of Maths, Physics, Computing & Electronics, >Macquarie Univerity. >Sydney. Australia. email: johns@macadam.mpce.mq.edu.au >-----------------------------------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads