User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Legacy and Other Languages section within the Software Development category of DaniWeb, a massive community of 427,756 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,693 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Legacy and Other Languages advertiser: Programming Forums
Views: 2183 | Replies: 3
Reply
Join Date: Jul 2005
Posts: 5
Reputation: debronkart is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
debronkart debronkart is offline Offline
Newbie Poster

Syntax error (memory issue??)

  #1  
Jul 18th, 2005
[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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2004
Posts: 173
Reputation: BinaryMayhem is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 9
BinaryMayhem BinaryMayhem is offline Offline
Unverified User

Re: Syntax error (memory issue??)

  #2  
Aug 11th, 2005
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.
Reply With Quote  
Join Date: Jul 2005
Posts: 5
Reputation: debronkart is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
debronkart debronkart is offline Offline
Newbie Poster

Re: Syntax error (memory issue??)

  #3  
Aug 11th, 2005
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!
Reply With Quote  
Join Date: Jul 2005
Posts: 5
Reputation: debronkart is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
debronkart debronkart is offline Offline
Newbie Poster

Re: Syntax error (memory issue??)

  #4  
Aug 16th, 2005
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Legacy and Other Languages Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Legacy and Other Languages Forum

All times are GMT -4. The time now is 12:59 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC