Statistics: Posted by Seb McClouth — Thu Nov 29, 2007 1:26 pm
Statistics: Posted by burger2227 — Wed Nov 28, 2007 5:12 pm
Code:
SUB Delay (Dela!) start = TIMER DO WHILE start + dela! > TIMER IF start > TIMER THEN start = start - 86400 'midnite correction LOOPEND SUB
I use this instead of SLEEP for a very important reason. SLEEP only stops a program until a keypress by the user!Code:
Delay .5 '1/2 second delay ' orCALL Delay(.5)
Code:
DO WHILE (NOT EOF(1)) 'loop until end of fileINPUT #1, nme$, Phone$, age%, Zip% IF nme$ = name$ THEN EXIT DOLOOPIF (NOT EOF(1)) THEN LINE INPUT #1, Line$ 'in an IF statement
Statistics: Posted by burger2227 — Sat Nov 17, 2007 5:19 pm
Code:
do...until EOF(filenr%)
? Because a file could contain more, or heck, not even exist for that matter.Statistics: Posted by Seb McClouth — Fri Nov 16, 2007 12:59 pm
Statistics: Posted by bungytheworm — Fri Nov 16, 2007 12:14 pm
Code:
DECLARE SUB TEXT (a AS INTEGER, b AS INTEGER, C AS STRING)'A database of SouylsinDEFINT A-ZCLSWbackround:FOR i = 1 TO 3COLOR 15, 12TEXT 15, 20, "Loading, Please wait."SLEEP 1CLS 2TEXT 15, 20, "Loading, Please wait.."SLEEP 1CLS 2TEXT 15, 20, "Loading, Please wait..."SLEEP 1CLS 2NEXT iCLStest:COLOR 15, 12LOCATE 1, 1PRINT "A production of Souylsin."SLEEP 1LOCATE 2, 1PRINT "Thanks to everyine who has contributed to this production."SLEEP 1LOCATE 3, 1PRINT "WikiDAT 0.11"SLEEP 1SHELL "TYPE help.txt"SLEEP 1LOCATE 10,1PRINT "TEST COMPLETE"LOCATE 11, 1PRINT "Press Any key to Continue"kp$ = INKEY$IF kp$ <THEN> 4 THEN selection% = 1 GOSUB Redraw CASE " "goto END SELECTLOOPRedraw:CLSFOR i = 1 TO 4 PRINT Menu$(i)NEXT iLOCATE selection%, 1COLOR 15, 12PRINT Menu$(selection%)COLOR 0, 12RETURNLOCATE 5, 20COLOR 14, 12PRINT "Database of Zelda Actors"ssearxh:GS:fnar:Anicode:asearch:CLS 2INPUT "Actor name, or part of one:", sactname$cmd$ = "FIND /I " + CHR$(34) + sactname$ + CHR$(34) + " Actordat.txt"SHELL cmd$PRINT "(A)nother search or (B)ack to main?"goto choiceext:CLS 2RANDOMIZE TIMERC = INT(RND * 0 + 15) + 1COLOR CLOCATE 10, 25PRINT "BYE!"SLEEP 1ENDSUB TEXT (a AS INTEGER, b AS INTEGER, C AS STRING)LOCATE a, bPRINT CEND SUB
Statistics: Posted by Sinuvoid — Fri Nov 16, 2007 10:26 am
You need to make that as function with return value. If value = ok, then call sub done and so on.EDIT:How would I be able to turn this into a sub?...
Code:
CONST OK = 1Function OkOrNot(a AS Integer, FileName AS String) AS IntegerOPEN FileName FOR INPUT AS #1INPUT #1, there$CLOSE #1locate a, 1IF there$ = "0000 0000 Link (may sometimes cause Z-buffer glitches)" THENPrint FileName; " Located successfully."RETURN OKELSEPRINT "Could not locate"; FileName "now exitting..."SLEEP 1ENDEND IFEND Function' this works after you create "Done" as sub.IF OkOrNot(a, "filenamehere") = OK Then Done
Statistics: Posted by bungytheworm — Fri Nov 16, 2007 8:36 am
Code:
find:OPEN file$ FOR INPUT AS #1INPUT #1, there$CLOSE #1IF there$ = "0000 0000 Link (may sometimes cause Z-buffer glitches)" THENLOCATE a, 1PRINT file$ " Located successfully."GOTO doneELSELOCATE a, 1PRINT "Could not locate"; file$ "now exitting..."SLEEP 1ENDEND IF
Statistics: Posted by Sinuvoid — Fri Nov 16, 2007 7:47 am
Code:
Temp$ = "Loading, Please wait..."CLS ' no need to locate since CLS allways put's cursor at 1,1.For counter = 1 TO LEN(Temp$)Print MID$(Temp$, counter, 1);' important to have ; at the end so line wont change.'DELAY CODE HERE: SLEEP 1 or somethingNext Counter
Statistics: Posted by bungytheworm — Fri Nov 16, 2007 7:28 am
Statistics: Posted by Sinuvoid — Fri Nov 16, 2007 7:01 am
Code:
SUB Text(a AS Integer, b AS Integer, c AS String) LOCATE a, b PRINT cEND SUB
Code:
FOR b = 1 TO 3000NEXT b
Statistics: Posted by bungytheworm — Fri Nov 16, 2007 6:47 am