For quite some time I've playing around with Python, which (until now)
perfectly suited my programming needs.
The thing is, i now need to code (for numerous reasons...) small and
fast utilities (some for DOS, some for Windows). Why small and fast?
(Why not?) But for a prosaic reason: to run on old-slow-small PCs.
Python is wonderful for the kind of things I have to produce; little
apps for retrieving Web pages, stripping tags, mailing, organizing
info ...etc...
But Python is s-l-o-w and the size issue is not auspicious (i actually
use py2exe to prevent installing Python on each PC, but a
"Hello,World!" prog is 56kb with a 800kb runtime DLL behind it, as for
GUI, a wxPython .exe is ~300kb with 8Mb of runtime DLLs...)
I've heard wonderful things about PowerBASIC: speed,size and good GUI
tools.
My question (as I have little/almost none BASIC experience):
is it easy to code (Power)BASIC to perform similar Python functions?
(append lists, work with arrays, database connectivity)
Is there any "catch" to create small-fast .exe in PB (learning
ASM...etc...)?
Does PowerBASIC for windows also compiles console programs?
Thank you for your time.
> Hi everyone.
Hi.
> For quite some time I've playing around with Python, which (until now)
> perfectly suited my programming needs.
I have been planning to take a look at Python but have been to busy with
PB, php, ASP, and VB projects. I heard that it has some similarities to
php.
> "Hello,World!" prog is 56kb with a 800kb runtime DLL behind it, as for
> GUI, a wxPython .exe is ~300kb with 8Mb of runtime DLLs...)
You would have the same results with VB. PB produces small executables
with no runtime. Now any DLL's you call in your program must be
included.
> I've heard wonderful things about PowerBASIC: speed,size and good GUI
> tools.
> My question (as I have little/almost none BASIC experience):
> is it easy to code (Power)BASIC to perform similar Python functions?
> (append lists, work with arrays, database connectivity)
All you mention is included in PB except the database stuff. There is a
good DAO example on the PB web site in the developer forums. I have used
it and will (when I get time) port that over to ADO.
> Does PowerBASIC for windows also compiles console programs?
There is a GUI compiler and a Console Compiler. It is possible to do
some console work with the GUI compiler and there are a number of
examples of the Console Compiler poping up GUI dialogs. There is also a
DOS compiler for when you don't have any version of Windows running.
i.e. DOS before version 7.
Simple? Well BASIC stands for
Beginners
All-purpose
Symbolic
Instruction
Code
--
ATB
Charles Kincaid
Coming from an OO language and without any pre-existing BASIC experience,
this may be more to your liking: www.freepascal.org
- Object oriented
- Broad platform support (DOS/Windows/OS2/Linux/FreeBSD)
- Small executable size
- Superior code quality (compared to PB)
- Free
Personally I consider the DOS version 3.5 as being quite effective and
fast in the resulting program. Even in a DOS window though, there is a
limitation on the size of file the IDE can handle. But since one can
INCLUDE
up to 5 other files as part of the same program code, plus LINK binary files
with routines already compiled by PowerBASIC, there are some work arounds.
I have to admit though that Windows programming leaves me cold in the
amount of the commands that one has to do to get straight to even get a
basic inter-action with the user. Debugging it gets to be a real pain to
me.
Most of the time I only wish to work math, read and control a I/O board, or
clear-up or edit data files, or the likes anyway.
Sincerely,
Gregory D. MELLOTT
"Soonioj" <soo...@yahoo.co.uk> wrote in message
news:78476353.03072...@posting.google.com...
> I have to admit though that Windows programming leaves me cold in the
> amount of the commands that one has to do to get straight to even get a
> basic inter-action with the user.
FWIW i wrote a "console I/O" template which allows basic screen I/O using
PB's *WINDOWS* compiler.
regards,
phil :)
So did PowerBASIC, Inc. They call it the Console Compiler. You can use LINE
INPUT, PRINT, LOCATE and most of the other MS-DOS BASIC commands with
minimal "mind shift."
MCM
yes Michael... however i just wrote my own functions (cStartup, cTitle,
cCleanup, cColor, cClear, cLocate, cInput, and cPrint)... the largest of
these is only 6 lines. PB/CC is good for advanced routines... but for basic
console I/O i see no point.
regards,
phil
Send me a copy of your code, if you might.
Sincerely,
Gregory D. MELLOTT
"sinewave" <no...@nowhere.com> wrote in message
news:oprtamzg...@10.0.0.1...
sure thing Gregory... i just sent it in the mail.
regards,
phil