Re: Questions

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

>Hello Euphorians,
>                I am a novice programmer. My first program a simple
>adding routine works fine, however the cum total displays as follows:
>{ 0, TOTAL }
>How do I get rid of the brackets and the 0 ?

I assume when you use the word TOTAL, you are using a label to
describe an atom element value in this sequence, and not the value "TOTAL",
a string. If this is the case, simply accessing the second element of the
above sequence will solve your problem. For example, if the value
{ 0, TOTAL } is stored in a sequence-type variable cum_total, you
state:

atom final_total (at beginning of program)

final_total = cum_total[2]

This will store the second element of the sequence in variable
final_total. You then display final_total. :)

>My second  program keeps on giving me type_check failure or true/false
>must be an atom. My input is a  atom!
>Dave to the rescue please!

Duke, this is where I am going to need to see your source. Chances are
your input (if you are using get(0) for example), is not an atom, but a
sequence. Can you send it to me at moggie at interlog.com? I'll personally
look it over and send you back the corrections, with explanations.

Thanks!

David Gay

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

Search



Quick Links

User menu

Not signed in.

Misc Menu