Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:37 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Renumber.bas

Author Message
James_From_Canb

Senior Member

Joined: 19/06/2011
Location: Australia
Posts: 265
Posted: 02:05pm 18 Feb 2013
Copy link to clipboard 
Print this post

I've rewritten RENUMBER.BAS to use MMBasic V4.3 functionality and make it a bit more robust.

Does anyone still use linenumbers? If you do, would you please test the program with some of your code and report any problems and suggest any improvements?

I have included a Comments.txt file with some possible improvements. There's also a file of test code called testfile.bas. It has the MMBasic code I tested the program code against. It's currently set up for me running multiple tests, so pressing the Enter key at each prompt will use my default file names for input and output.

The code is full of debug statements (which you won't see as it's controlled by a flag) and needs cleaning up so I won't release a final version until I implement the multitude of suggestions I expect to get

James

2013-02-19_000302_Renum43.zip
My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention.

Hedley Lamarr, Blazing Saddles (1974)
 
shoebuckle
Senior Member

Joined: 21/01/2012
Location: Australia
Posts: 189
Posted: 10:47am 19 Feb 2013
Copy link to clipboard 
Print this post

James,
You will find a few programs in MMLib have line numbers.
Hugh
 
James_From_Canb

Senior Member

Joined: 19/06/2011
Location: Australia
Posts: 265
Posted: 05:47pm 19 Feb 2013
Copy link to clipboard 
Print this post

True, but that won't give me feedback on whether the output formatting is useful for users who still use line numbers.

It's not a program that anyone is likely to use because there's a renumber facility in MMBASIC (and probably in MMIDE and MM EDIT). The rewritten program would only be useful if the functionality was removed from MMBASIC to free up space as suggested by another user some while back in another thread, and the user needed a renumber program that didn't run on a PC.

I've rewritten it because it was a good bit of mental exercise and I enjoy coding.

James
My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention.

Hedley Lamarr, Blazing Saddles (1974)
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 10:19pm 19 Feb 2013
Copy link to clipboard 
Print this post

I am relying on your renumber program as that facility in MMBasic will be gone in the next version (the space saved has been gratefully reused).

Geoff
Geoff Graham - http://geoffg.net
 
James_From_Canb

Senior Member

Joined: 19/06/2011
Location: Australia
Posts: 265
Posted: 07:35pm 21 Apr 2013
Copy link to clipboard 
Print this post

Here's the almost final version of Renumber.bas. 2013-04-22_052040_renumber.zip
I say 'almost final' because every program this size has at least one bug that's been missed and I don't see why my code would be any different.

To get it to work properly you'll have to also put ShoeBuckle's FORMAT.BAS in the same directory.

It has a couple of nice additions that took a while to code, which is why it's taken so long. There's a CONFIG program that reads from a config file and populates global variables, then writes back the global variables to the file at the end of processing. Thanks for the idea TZ.

Unfortunately the code to manage the reading and writing of the global variables is repetitive and it's easy to make a mistake, so I wrote CONCODER to automate the creation of the code. Once I know the majority of bugs have been cleaned out of RENUMBER, I'll finish coding CONCODER. In the meantime, at least I can release RENUMBER.

I've checked it with some test files and the renumbering seems to work as it should, I never did get the formatting to work properly - which is why I rely on Hugh's FORMAT program.

Let me know if you find any problems. Or even better, if you don't.

James
My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention.

Hedley Lamarr, Blazing Saddles (1974)
 
shoebuckle
Senior Member

Joined: 21/01/2012
Location: Australia
Posts: 189
Posted: 09:44pm 21 Apr 2013
Copy link to clipboard 
Print this post

  James_From_Canb said  
To get it to work properly you'll have to also put ShoeBuckle's FORMAT.BAS in the same directory.
James

The current version of FORMAT.BAS which supports chaining from Renumber is available from members.optusnet.com.au/hnmpb/Maximite/Format.zip.

Cheers,
Hugh
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 09:51pm 22 Apr 2013
Copy link to clipboard 
Print this post

  shoebuckle said  
The current version of FORMAT.BAS which supports chaining from Renumber is available from members.optusnet.com.au/hnmpb/Maximite/Format.zip.
Cheers,
Hugh

The link isn't working for me Hugh - can you check it please.

Errr - it works OK if you remove the extra "."

Edited by paceman 2013-04-24
 
James_From_Canb

Senior Member

Joined: 19/06/2011
Location: Australia
Posts: 265
Posted: 12:17am 23 Apr 2013
Copy link to clipboard 
Print this post

When you click the link you get http://www.thebackshed.com/forum/members.optusnet.com.au/hnm pb/Maximite/Format.zip in the address bar. The forum probably added a random space in there somewhere for this message.

The link below should work. It's the cut-and-paste with an http:// added and without the "." (although the http isn't strictly necessary nowadays).

http://members.optusnet.com.au/hnmpb/Maximite/Format.zip

James
My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention.

Hedley Lamarr, Blazing Saddles (1974)
 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 01:14am 23 Apr 2013
Copy link to clipboard 
Print this post

Or even better
Download


to do the above style link remembering to remove the space before =http
[quote][url =http://members.optusnet.com.au/hnmpb/Maximite/Format.zip]Download[/url][/quote]Edited by djuqa 2013-04-24
VK4MU MicroController Units

 
shoebuckle
Senior Member

Joined: 21/01/2012
Location: Australia
Posts: 189
Posted: 01:21pm 23 Apr 2013
Copy link to clipboard 
Print this post

Thanks paceman, James_From_Canb and djuqa. Sorry for any inconvenience, but it is gratifying to see that there is some interest in the program.

Cheers,
Hugh
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024