Page 1 of 1

A question of size

Posted: Mon Aug 30, 2010 9:16 am
by Banfield
Hi all guy?s. I?m new in this forum. I have no write any basic prg from the time of the legendary Commodore 64.

I did a program about 100 lines including some "rem" sentences. The program once compiled is about 65KB, so big for the few things it does. Is it normal?

Another question. How can I pass data from command line once the prg is made .exe, example

myprogram.exe /h

How can I read the /h or any other switch/command/data when invoking the prg.

Very thanks in advance.

Best regards.

Posted: Tue Aug 31, 2010 1:48 pm
by angros47
1) A program compiled with qb contains not only your code, but also runtime code (i.e.: the PLAY command provides a true mini-language, it needs a sort of "interpreter", and it will be included in the .exe file, consuming memory)

2) use COMMAND$ variable:

in your example:
myprogram.exe /h

COMMAND$ will be "/h". You can check it in your program with:

Code: Select all

IF COMMAND$="/h" THEN PRINT "You used /h switch"
Read the help!

OK

Posted: Wed Sep 01, 2010 7:20 am
by Banfield
Yes. OK, I read the help, but it is a bit difficult to find keywords by function. Oldest QBasic?s (I believe) they had the alphabetically ordered words, and by fuction. Mine, hasn?t the las option.

Best regards.

Osvaldo from Banfield, Buenos Aires, Argentina.

Posted: Thu Sep 02, 2010 4:05 am
by burger2227
What version are you using? You can download QB 4.5 here:

http://dl.dropbox.com/u/8440706/QB45.zip

The Help file Index is listed alphabetically. Just press a letter key to go to that list of keywords. It's in English, but you can probably understand it well enough.

QB64 has a QBasic WIKI that explains keywords and has code examples here:

http://qb64.net/wiki/index.php?title=Ke ... phabetical

There is a link on the top area of that page to download an offline version of the WIKI.

Welcome and have fun,

Ted