Re: get()

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

"get" is for reading data in the same format as is printed by "print" or
"?". It is the same as using "gets" to get a string then putting it through
"value".
Example:

include get.e
object in
puts(1,"Please type a euphoria object (atom or sequence): ")
in = get(0)
--In now contains {error status, value}, if a valid Euphoria object was
entered
--then error status will equal GET_SUCCESS and value will contain the object
if in[1] = GET_SUCCESS then
    puts(1,"\nYou entered: ")
    ? in[2]
    if sequence(in[2]) then
        printf(1,"(a sequence of length: %d )",{length(in[2])})
    else
        puts(1,"(an atom)\n")
    end if
else
    puts(1,"\nYou did not enter a valid euphoria object\n")
end if


You could also use it to store sequence data in a file, just write the
sequence to the file with "print" and retrieve it with "get"
Thomas Parslow (PatRat) ICQ #:26359483
Rat Software
http://www.ratsoft.freeserve.co.uk/
Please leave quoted text in place when replying
----- Original Message -----
From: Asif Masood Baloch <cyberego at QTA.PAKNET.COM.PK>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Friday, August 18, 2000 7:09 PM
Subject: Re: get()


Hi friends,

Im back as Sweet Kill. WEll, I covered a lot during i was away. I know what
is wait_key(), gets() but i am confused with get(). Will somebody explain
this?

Thanks

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

Search



Quick Links

User menu

Not signed in.

Misc Menu