Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

back up past a read DBaseV for dos 1

Status
Not open for further replies.

Hobosan

MIS
Sep 30, 2005
9
GB
I have a Read after every Get M_VAR and don't want to lose this flexibility.
I'd like to go back up the screen for re-edit purposes.
I have put each read module into a procedure and captured the '<' symbol using 'On Key Label'. But after about 18 recursions I get a 'nesting' error. Can I clear the stack so that after each On Key command 'Do Procedure' it does not return to calling procedure?
Or am I missing a simpler way.
Dear old Dbase I have been using it to run my company for 25 years.
 
Each time you use an ON KEY LABEL to call a procedure or function, it adds another program level to the stack. So if you're on you're 18th READ andwant to go back 18 READs, then you're talking about 18 levels on top of what you already had at the time you began.

I don't have the reference manual handy right now for dBase V, but I do remember that the old FoxPro 2.6 for DOS of the same time period had only 32 levels.

Why not set multiple ON KEY LABELs or perhaps just a few extraa to go backwads by group rather than item?

Please be aware dBase 5, a 16-bit version enhanced to run on 32-bit Windows computers, does have several quirks that may become an issue when run on NT/2000/XP systems. Most of them you can work around, but eventually you'll have to upgrade to a newer Windows-aware language.

Although I'm not familiar with the newer dBase versions, I now use Visual FoxPro and since it is a 32-bit language, it runs 5-10 times faster, so surely the newer dBase versions run faster too, I just don't know how much faster.

dbMark
 
Thanks Mark
I'll probably settle for going back in groups of field, I can understand that.
Changing ver to windows ver would be too much for me, never understood that object orientated stuff (probably just too old)
Thanks again, delighted to get a response! Alan (UK)

Alan
ElectricalTesting.co.uk
 
You could place your gets and reads inside a do loop. When you decide you want to go back up, you can issue a read kill and loop to go back to the top to start over.

example:

do
get m_var_1
get m_var_2
read
if lastkey() = ESC
readkill
loop
endif
enddo

Or, instead of using a read after every get you could use the valid clause to determine whether to go back or go on.

Regards,
David.
 
Thanks very much David. Very helpful

Regards ........... Alan

Alan
ElectricalTesting.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top