[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2018-12-31T08:18:56-05:00 http://petesqbsite.com/phpBB3/app.php/feed/topic/9429 2018-12-31T08:18:56-05:00 2018-12-31T08:18:56-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=32644#p32644 <![CDATA[Re: what seems like a bogus syntax error]]> Statistics: Posted by burger2227 — Mon Dec 31, 2018 8:18 am


]]>
2018-12-31T07:04:48-05:00 2018-12-31T07:04:48-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=32643#p32643 <![CDATA[Re: what seems like a bogus syntax error]]> Now that I've gotten the "space between PRINT and #" rule in my head
I get an "Expected operator in equation" error in this line

xa$=month$(monthcounter)+str$(q)+", "year$

I couldn't figure out anything wrong with this line of code at all, and as before, it runs just fine and generates no error in GWBASIC running under DOSBOX... BUT when I kept thinking about the error message, I finally figured out that an additional "+" sign was needed between "," and year$.

I present this only to help others who might have the same problem.

Wouldn't it be great if QB64 could highlight where an error occurred in orange? Unless you are the actual author of QB64, you can't add this enhancement yourself, but maybe the powers that be will see this suggestion (or maybe it's old and can't be fixed).

Happy New Year!

PS I keep having to log back on to submit my posts, so this may never make it to the board.

Statistics: Posted by rjoslin414 — Mon Dec 31, 2018 7:04 am


]]>
2018-12-29T06:58:21-05:00 2018-12-29T06:58:21-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=32642#p32642 <![CDATA[Re: what seems like a bogus syntax error]]> Statistics: Posted by rjoslin414 — Sat Dec 29, 2018 6:58 am


]]>
2018-12-29T06:57:25-05:00 2018-12-29T06:57:25-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=32641#p32641 <![CDATA[Re: what seems like a bogus syntax error]]> Statistics: Posted by rjoslin414 — Sat Dec 29, 2018 6:57 am


]]>
2018-12-24T22:48:30-05:00 2018-12-24T22:48:30-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=32637#p32637 <![CDATA[Re: what seems like a bogus syntax error]]>
https://www.qb64.org/wiki/PRINT_(file_statement)

Statistics: Posted by burger2227 — Mon Dec 24, 2018 10:48 pm


]]>
2018-12-24T15:43:44-05:00 2018-12-24T15:43:44-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=32636#p32636 <![CDATA[Re: what seems like a bogus syntax error]]>
1 REM mkyr002.bas makeyear v2
2 'to make an entire year's journal files
4 KEY 4, "save" + CHR$(34) + "mkyr002" + CHR$(34) + ",a"
50 DIM MONTH$(12), DAY$(7), NUMDAYS(12), FILNUM$(12)
99 REM DATA LINES
100 DATA January,February,March,April,May,June,July,August,September,October,November,December
110 DATA Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
120 DATA 31,28,31,30,31,30,31,31,30,31,30,31
130 DATA 01,02,03,04,05,06,07,08,09,10,11,12
199 REM load arrays
200 RESTORE 100: FOR Q = 1 TO 12: READ MONTH$(Q): NEXT: PRINT "months loaded"
210 RESTORE 110: FOR Q = 1 TO 7: READ DAY$(Q): NEXT: PRINT "day names loaded"
220 RESTORE 120: FOR Q = 1 TO 12: READ NUMDAYS(Q): NEXT: PRINT "number of days per month loaded"
230 RESTORE 130: FOR Q = 1 TO 12: READ FILNUM$(Q): NEXT
300 REM input year from user
310 REM
320 PRINT "Enter year or 'x' to EXIT": INPUT X$: IF X$ = "" THEN 320
330 IF X$ = "x" THEN END
335 REM handle leap year
340 YEAR = VAL(X$): IF YEAR < 2000 THEN PRINT "Invalid year": GOTO 320
350 LEAP = YEAR MOD 4: IF LEAP = 0 THEN NUMDAYS(2) = 29
400 REM enter starting day of year (1=Sunday)
410 PRINT "ENTER STARTING DAY OF THE WEEK FOR "; YEAR
420 INPUT SD$: SD = VAL(SD$)
430 MONTHCOUNTER = 0
499 YEAR$ = X$
500 REM start the actual output to files
505 REM
510 MONTHCOUNTER = MONTHCOUNTER + 1: REM increment moco to start
515 IF MONTHCOUNTER = 13 THEN END
519 A$ = FILNUM$(MONTHCOUNTER)
520 OPEN "o", 1, A$ + LEFT$(MONTH$(MONTHCOUNTER), 3) + MID$(STR$(YEAR), 4, 2) + ".txt"
530 FOR Q = 1 TO NUMDAYS(MONTHCOUNTER)

546 xa$ = MONTH$(MONTHCOUNTER) + STR$(Q) + ", " + years$

547 PRINT#1,xa$
550 REM day of week part
560 PRINT#1,DAY$(SD): SD=SD+1: IF SD=8 THEN SD=1
565 PRINT#1,
570 NEXT: CLOSE 1
600 IF MONTHCOUNTER=13 THEN END
610 GOTO 500

Statistics: Posted by rjoslin414 — Mon Dec 24, 2018 3:43 pm


]]>
2018-12-21T16:25:27-05:00 2018-12-21T16:25:27-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=32635#p32635 <![CDATA[what seems like a bogus syntax error]]>
PS I wrote a small program using QB64 which compiled just fine and produced an exe file which worked on both win7 and 10, so I don't think there's anything wrong with the version of 64 that I'm using.

Rick Joslin
Carolina Beach, NC

Statistics: Posted by rjoslin414 — Fri Dec 21, 2018 4:25 pm


]]>