|
Post by James :) (aka Madcow) on May 20, 2007 4:25:44 GMT -5
what do you mean by being able to pass parmetars to basic4gl
|
|
|
Post by Empyrion Martyr on May 27, 2007 16:46:55 GMT -5
Like what you do in c and c++ with argc and argv vectors, that is useful for example when you make a shortcut to the program with special arguments (parameters) or when you call the program from within another program with a special set of arguments: take this for example: we have SEARCH.GB program which we compile into an EXE. It takes as arguments, the files we want to search. If we make a shortcut to the proggy or call it from DOS or another proggy with the files as arguments it will automatically know what it's doing so it could start searching without any further input from the user. Totally automated.
example SEARCH gdi32.dll win.ini would prolly make the program know to search those 2 files.
How to use them in Basic4gl: argcount() specifies how many arguments we have arg(N) specifies the N-1 argument example:
dim i printr argcount() for i = 0 to argcount() printr arg(i) next
would write on the screen all the arguments. you are left to do whatever you see fit with them
|
|