|
| | |||||||
| Apple Macintosh Hardware Discuss the Apple Macintosh Hardware |
| | LinkBack | Thread Tools |
| |||
| help debugging simple basic program this basic program (simple poetry-generating program) keeps giving me errors. I'm using the free Chipmunk Basic on OSX. Any help apprectiated.. 10 rem hanshan 20 gosub 250 : rem initialize 30 rem choose pattern 40 r = int(rnd(1)*3)+1 50 on r gosub 90,140,190 60 for t = 1 to 2500 : next t 70 print : print : print 80 goto 40 90 rem ** pattern one ** 100 color 14 : print w$(int(rnd(1)*20+1));"...";w$(int(rnd(1)*20+1)) 110 print tab (5);"...";w$(int(rnd(1)*20+1)) 120 print tab (8);s$(int(rnd(1)*20+1)) 130 return 140 rem ** pattern two ** 150 color 10 : print s$(rnd(1)*20+1)) 160 print tab (3);s$(int(rnd(1)*20+1));"..." 170 print tab (6);s$(int(rnd(1)*20+1)) 180 return 190 rem ** pattern three ** 200 color 15 : print tab (3);w$(int(rnd(1)*20+1)) 210 print s$(int(rnd(1)*20+1)) 220 print tab (3);w$(int(rnd(1)*20+1));",";s$(int(rnd(1)*20+1)) 230 return 240 rem **************** 250 rem initialization 260 width 40 270 randomize val(right$(time$,2)) 280 dim w$(20),s$(20) 290 for j = 1 to 20 300 read w$(j) 310 next j 320 for j = 1 to 20 330 read s$(j) 340 next j 350 return 360 rem ** data ** 370 rem ** single words ** 380 data "scurrying","trading","gazing","withered","chisell ed" 390 data "muffled","flanked","writhed","bending","twist ing" 400 data "hammered","hanging","winding","clearest","wea ry" 410 data "earthworld","cataract","sacrificial","slippery"," assunder" 420 data " ** short phrases **" 430 data "in" "the" "cool" "stream" 440 data "nodded in clustered grace" 450 data "waves" "of" "coolness" 460 data "out from the deepest" 470 data "sullen","sullen" 480 data "in the black darkness" 490 data "i" "take" "your" "poems" 500 data "i put out the lamp" 510 data "my" "short" "span" "runs" "out" 520 data "those" "that" "are" "left" 530 data "men or learning" 540 data "men" "of" "action" 550 data "I" "HURRY" "FORWARD" 560 data "WHY" "SHOULD" "YOU" "WASTE" 570 data "WHEN" "SHALL" "WE" "MEET" 580 data "LITTLE" "SLEEPING" 590 data and "MUCH" "GRIEVING" 600 data for "THOS" "FEW" "STEPS" 610 data "NOW" "AT" "DUSK" 620 data "I" "HAVE" "DONE" "WITH" "PROFIT" |
| |||
| Re: help debugging simple basic program Do you have any more info? kind of error? line # of error? -- Walt Sellers Computer Engineer For Hire www.VirtualOutpost.com ws_usenet@virtualoutpost.com - include the keyPhrase "WhoYaGonnaCall?" in the body or subject of the message to get past the spam filters. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Meddle not in the affairs of dragons; for thou art crunchy and good with ketchup. -unknown =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= In article <hJFCc.4996$lL2.387068@twister.tampabay.rr.com>, Marco <ng555@cfl.rr.com> wrote: > this basic program (simple poetry-generating program) keeps giving me > errors. I'm using the free Chipmunk Basic on OSX. Any help apprectiated.. > > 10 rem hanshan > 20 gosub 250 : rem initialize > 30 rem choose pattern > 40 r = int(rnd(1)*3)+1 > 50 on r gosub 90,140,190 > 60 for t = 1 to 2500 : next t > 70 print : print : print > 80 goto 40 > 90 rem ** pattern one ** > 100 color 14 : print w$(int(rnd(1)*20+1));"...";w$(int(rnd(1)*20+1)) > 110 print tab (5);"...";w$(int(rnd(1)*20+1)) > 120 print tab (8);s$(int(rnd(1)*20+1)) > 130 return > 140 rem ** pattern two ** > 150 color 10 : print s$(rnd(1)*20+1)) > 160 print tab (3);s$(int(rnd(1)*20+1));"..." > 170 print tab (6);s$(int(rnd(1)*20+1)) > 180 return > 190 rem ** pattern three ** > 200 color 15 : print tab (3);w$(int(rnd(1)*20+1)) > 210 print s$(int(rnd(1)*20+1)) > 220 print tab (3);w$(int(rnd(1)*20+1));",";s$(int(rnd(1)*20+1)) > 230 return > 240 rem **************** > 250 rem initialization > 260 width 40 > 270 randomize val(right$(time$,2)) > 280 dim w$(20),s$(20) > 290 for j = 1 to 20 > 300 read w$(j) > 310 next j > 320 for j = 1 to 20 > 330 read s$(j) > 340 next j > 350 return > 360 rem ** data ** > 370 rem ** single words ** > 380 data "scurrying","trading","gazing","withered","chisell ed" > 390 data "muffled","flanked","writhed","bending","twist ing" > 400 data "hammered","hanging","winding","clearest","wea ry" > 410 data "earthworld","cataract","sacrificial","slippery"," assunder" > 420 data " ** short phrases **" > 430 data "in" "the" "cool" "stream" > 440 data "nodded in clustered grace" > 450 data "waves" "of" "coolness" > 460 data "out from the deepest" > 470 data "sullen","sullen" > 480 data "in the black darkness" > 490 data "i" "take" "your" "poems" > 500 data "i put out the lamp" > 510 data "my" "short" "span" "runs" "out" > 520 data "those" "that" "are" "left" > 530 data "men or learning" > 540 data "men" "of" "action" > 550 data "I" "HURRY" "FORWARD" > 560 data "WHY" "SHOULD" "YOU" "WASTE" > 570 data "WHEN" "SHALL" "WE" "MEET" > 580 data "LITTLE" "SLEEPING" > 590 data and "MUCH" "GRIEVING" > 600 data for "THOS" "FEW" "STEPS" > 610 data "NOW" "AT" "DUSK" > 620 data "I" "HAVE" "DONE" "WITH" "PROFIT" > |
| |||
| Re: help debugging simple basic program In article <ujhDc.2413$OR4.212961@twister.tampabay.rr.com>, Marco <ng555@cfl.rr.com> wrote: > the first error is "Syntax error in line 330" > > marco > > > > > W. Sellers wrote: > > Do you have any more info? kind of error? line # of error? > 250 rem initialization > 260 width 40 > 270 randomize val(right$(time$,2)) > 280 dim w$(20),s$(20) > 290 for j = 1 to 20 > 300 read w$(j) > 310 next j > 320 for j = 1 to 20 > 330 read s$(j) > 340 next j > 350 return Its been a long time since I used Basic, but I don't see a reason it would think 330 has a syntax error if line 300 doesn't, unless it expected some other construct to close the previous 'for' loop or its reporting the wrong line number in the error (not unheard of.) Perhaps another error in your list? Just post the entire error output. is there a reason you dont use: > 290 for j = 1 to 20 > 300 read w$(j) > 310 read s$(j) > 320 next j -- Walt Sellers Computer Engineer For Hire www.VirtualOutpost.com ws_usenet@virtualoutpost.com - include the keyPhrase "WhoYaGonnaCall?" in the body or subject of the message to get past the spam filters. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Meddle not in the affairs of dragons; for thou art crunchy and good with ketchup. -unknown =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Debugging a Visual Studio 2008 Program under Vista? | Ross M. Greenberg | Windows Vista | 2 | 10-28-2009 05:30 AM |
| Visual Basic 6 Program Name | Andy DeFilippo | Windows Vista | 0 | 03-22-2007 01:00 PM |
| Visual Basic 6.0 Program on Vista | Andy DeFilippo | Windows Vista | 3 | 03-21-2007 06:30 AM |
| Simple basic tasks | Russell | Windows Vista | 2 | 02-24-2007 10:00 AM |
| Simple backup program that runs at shutdown? | Noozer | Windows XP | 5 | 02-19-2007 07:16 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |