[Somehow I posted this Friday in the VB456 forum...sheesh, you'd think after 15 years of foruming, I'd do better than THAT... well, let's try again here.]

I confess that I'm very very rusty with this. Years ago I programmed a QB45 app for a client, and have never done anything since. Today we found a bug and I've found it in the source but I can't get the (unchanged) code to start in QB45 under XP; I get "Syntax Error" when I do Alt-R-Restart. (I had "out of memory" errors but other msgs on this wonderful forum got me past that.)

The Syntax Error msg arises right near the start of my .BI file:

DEFINT A-Z

TYPE lineparams
ID AS STRING * 2
Ft AS INTEGER
St AS INTEGER
Sz AS SINGLE
EC AS INTEGER
SW AS SINGLE
CS AS INTEGER
WS AS INTEGER
CD AS INTEGER
On AS INTEGER

[17 more items follow in the TYPE definition]
END TYPE

I'm suspicious of the word "On" as a possible error cause, but it used to work...

I know such errors can be misleading - could be caused by all kinds of other things, which can later lead to the error that I actually see.

I'm so rusty, I'll even list some primitive things about the project in case I'm overlooking something trivial:
--5 .BAS files
--a .BI and .MAK file (the .MAK is what I'm opening in the UI)
--total 256,438 bytes
Paths are set to C:\QB45, and .BAS

btw, in this case the change I want to make is so trivial that I can edit it into the .BAS file and compile manually, but I've lost all documentation about how to use BC. Is there an online QB45 manual or can you remind me how?

What can I do? Thanks in advance -
Dave

welp, I dunno if you solved the problem or not. its now like a month later... but the syntax error is deff the line "on as integer".
ON is a QB reserved word. it always has been. if you change the variable decleration from ON to something like varON then your error will be gone.
some reserved words that require ON:
ON KEY, ON UEVENT, ON STRIG, ON PLAY, ON OPEN, ON ERROR, ON TIMER.

I figured it was ON, but for the life of me I can't figure out why it worked for several years before. (Scratching head.)

As it happens, the project faded momentarily and now will be a good time for it to come back to life. Thanks!

welp, I dunno if you solved the problem or not. its now like a month later... but the syntax error is deff the line "on as integer".
ON is a QB reserved word. it always has been. if you change the variable decleration from ON to something like varON then your error will be gone.
some reserved words that require ON:
ON KEY, ON UEVENT, ON STRIG, ON PLAY, ON OPEN, ON ERROR, ON TIMER.

Thanks again for this suggestion. I changed all .On as you suggest, and ran into a complaint about a definition...
DECLARE SUB HandlePix (Arg$, Params as LineParams, BoxWidOnly!, PSx@)

Alt-R-R highlighted the "@)" and said "Expected: , or )". I changed it to "PSx as LONG" and the complaint stopped.

But now when I try to open my .MAK file, I get "out of memory. BOY do I wish I had a better memory, or better records of how I used to do this!

I'm running XP Pro; I set my PIF memory settings:
Total memory: Auto
Initial env: Auto
EMS: None
XMS: Auto (used HMA)
DPMI: Auto

Total size of all .BAS files +.BI = 257,055 bytes.

I'm off to do more digging on my own but if anyone has the quick dope-slap fix, let me know -

Dave

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.