944,156 Members | Top Members by Rank

Ad:
Jul 18th, 2005
0

Syntax error (memory issue??)

Expand Post »
[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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
debronkart is offline Offline
5 posts
since Jul 2005
Aug 11th, 2005
0

Re: Syntax error (memory issue??)

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.
Reputation Points: 15
Solved Threads: 10
Unverified User
BinaryMayhem is offline Offline
173 posts
since Jun 2004
Aug 11th, 2005
0

Re: Syntax error (memory issue??)

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!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
debronkart is offline Offline
5 posts
since Jul 2005
Aug 16th, 2005
0

Re: Syntax error (memory issue??)

Quote originally posted by BinaryMayhem ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
debronkart is offline Offline
5 posts
since Jul 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Legacy and Other Languages Forum Timeline: Logic to determine the efficient person
Next Thread in Legacy and Other Languages Forum Timeline: Program to automatically convert from C++ to matlab?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC