Crashed Pips - Computers, politics, emetic trash

Sunday, July 1, 2007

RANDOM access on QuickBasic

Filed under: Uncategorized — Tags: , , , — Jonathan Rothwell @ 15:22

QuickBasic is one of my favourite programs of all time. It is a program from the days when Microsoft was focussed on producing good software, instead of maximising profit. How times have changed.

If you’ve never used QuickBasic and have no intention of doing so then this post will be no use to you whatsoever. I’m not guaranteeing that it will be of any use even if you do use QuickBasic.

I wanted to write a program that would simply write and read from random-access files. Simple as. No frills.

Here it is. It’s been compiled into an EXE file that doesn’t need BR45 files (yay!) and because I’m feeling nice, I’ve posted the source code here. Read on to see it.

(more…)



Monday, March 19, 2007

Converting batch files to .EXEs

Filed under: Uncategorized — Tags: , , , , — Jonathan Rothwell @ 19:37

I commonly use batch and script files in Windows and Linux respectively - they’re easy to code, save time for the end user and work instantly on a single double-click (well, most of the time). Sometimes however, it’s useful to convert them to an executable format to stop well-meaning users unintentionally fiddling with them.

Over on Daily Cup of Tech, Tim Fehlman writes about how to turn a Windows batch file into an executable.

That’s all well and good, but I can see at least two problems with this:

  1. What if the batch file needs to be modified? It can’t be edited by the end user unless they edit the source .bat file and then recompile it.
  2. There’s no way I know of to do this for Linux. Any ideas?
  3. It’s not technically been compiled, it’s just a wrapper around the batch file.
  4. What if the file in particular being called by the batch file doesn’t exist? There is no way I can see to handle exceptions in batch files.



Powered by WordPress 2.7 Comments are the responsibility of their respective author. The Rest © 2007-2009 Jonathan Rothwell, unless otherwise stated.