Re: Newbie frustration with command_line()

new topic     » goto parent     » topic index » view thread      » older message » newer message

The reason you get that "weird smiley looking thing" is probably because you
uses puts() instead of print(). puts() is for literal sequences (think
put-string) and print() is for atoms and sequences of atoms. All of us
probably had an issue learning the difference when we started.

~Greg

----- Original Message -----
From: "robby" <guest at RapidEuphoria.com>
To: <EUforum at topica.com>
Sent: Monday, July 05, 2004 11:53 PM
Subject: Newbie frustration with command_line()


>
>
> posted by: robby <robby at prgalaska.com>
>
>
> I'm just now starting to play around with euphoria, and I tried tweaking
some sample programs to get a feel for it.
>
> I'm having a bit of a problem with sending arguments via the command line.
I can't seem to get the command line function to work. if I have this code
(which I copied off this forum):
> }}}
<eucode>
> include get.e
> sequence parm, fileName
> atom vwait
>    parm = command_line()
>    if length(parm) > 2 then
>       -- they entered a file name
>       -- note that only the first name entered is used
>       fileName = parm[3]
>    else
>       -- no file name
>       fileName = "none"
>    end if
> puts(1, fileName)
> vwait =wait_key()
>
> </eucode>
{{{

>
> I get "none" output to the console like I'd expect if I pass no command
line arguments...
>
> but if I DO pas arguments, I still get none. (format cmdline.exw test
test2 etc)
>
> I tried sending the count to the console, but all I got (with and without
arguments) was this wierd smiley looking thing, but I have a feeling I was
trying to output something that wasn't in the right format on that one.
>
> So, does any of this ring any bells for anyone? Thanks!
>
> Oh yeah I'm using windows xp home
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu