Results 1 to 7 of 7

Thread: command line parameters

  1. #1

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444
    WOW! that was fast!
    thanks for the input to you both.
    I only need one parameter now but I would like to see how to handle more then one.
    I appreciate everyones help
    it works!!!
    this is what linux need to be competitive. A quick down and dirty programming system that save people time. This program has taken 20 mins and will save us hours down the road.
    I am so skeptical, I can hardly believe it!
    PS I am not a 'hyperactive member' I am a cool, calm, and collected member

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Linux has Perl, Python, and a fast C++ compiler
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Guest
    Actually you can have more than 1 parameter. Just use the Split() function to differentiate them.

  4. #4

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444
    do you feel that it is as easy as VB to make a cross application program with perl?
    I think that money is in the development time not always the speed of execution.
    sure games need speed. but if I wrote this prog in C++ and it was 25% faster. Would mean nothing to us. With VB it comes up in a flash now. I have not written a C prog in 5 years(back in school)
    I wish linux would take off, I use it, with apache for my home web server. But I don't think it is to a point where everyone can start using it. This is just my opinion.
    Hell, I use the linux credit card that has MBNA donating money to the linux fund.
    cute little penguin
    I am so skeptical, I can hardly believe it!
    PS I am not a 'hyperactive member' I am a cool, calm, and collected member

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Definitely, although text-handling apps work very well with Perl, and it's good for databases (the DBI module).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736

    Cool

    Since the contents of the "Command" function are in a string, you can use the string handling functions to split out multiple parameters.

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I used a method like this:
    Code:
    c:\myapp\myapp.exe --parm1=val1 --spaceval="space val"
    ...and parsed it out into a Collection:
    Code:
    debug.print m_args("parm1") ' prints val1
    I can't find the code at the moment, though.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width