Help Needed > How its called?

Sorry for stupid q. but how do you call when you call program and after it you add more data.
.program -help-about
I'm using Linux FPC compiler and all coding should work with linux as well...
Can you give codding (using) samples. I know thats not the place but it would be great to get same thing with assembly as well :)


  • i finded it my self... it called command-line parameter here is my program (working on linux) as an sample:

    [code]Program task4 ( output );
    Uses PointSet; //my culstom task set with pointers
    var list : Tlist; // my sets type (list value is string type)
    result, data : string; // file names
    id : integer; // parameters id
    s, c, m : boolean; // logical stuff
    //--------------------------------by default------------------------------------
    data := 'data.txt'; result := 'result.txt'; c := false; m := false; s := false;
    WriteLn ('Help call: -h');
    //--------------------------------parameter analyze-----------------------------
    for id := 1 to ParamCount do
    if ParamStr(id) = '-h' then
    WriteLn ('Program call parameters:');
    WriteLn ('"-h" Help');
    Write ('"-f " Input file');
    Write ('by default ',data); WriteLn;
    Write ('"-r " Output file');
    Write ('(by default ',result); WriteLn;
    WriteLn ('"-s" Uses same input file for output');
    Write ('"-c" Output destination is screen (-r is not used)');
    Write ('(by default works with files)'); WriteLn;
    Write ('"-m" Manual input (in screen) (-f is not used)');
    Write ('(by default works with files)'); WriteLn;
    halt; // if help is activated it halts the program
    if ParamStr(id) = '-f' then
    data := ParamStr(id + 1);
    if ParamStr(id) = '-r' then
    result := ParamStr(id + 1);
    if ParamStr(id) = '-s' then
    s := true;
    if ParamStr(id) = '-c' then
    c := true;
    if ParamStr(id) = '-m' then
    m := true;
    if s = true then result := data;
    //it chose wich culstom command to use one reads from files to the list
    //other d the same but works with the screen
    if m = false then
    Readfile_l ( list, data ) else Readall_l ( list );
    //same choosing but this command prints same list backwards
    //dont think why. its the task.
    if c = false then
    Printfback_l ( list, result ) else Printback_l ( list );
    // culstom Pointset command to dispose all list (clear memory)
    Remove_l ( list );
    WriteLn ('End'); //finish message
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion