1. Characters in sequences

Hello all,

This is a ridiculously easy question I am sure, but, how does one put text
inside a sequence. Here is what I am trying:

sequence word
word = {"Hello there"}

puts(1,word)

When I try to run this I am told "Sequence found inside a character string".

What am I doing wrong?

Also, has anyone else been able to run the tutorial file GETC.ex? When I try
to run it it cannot find the file that it wants even though it is in the
same directory and everything.

Thanks.

David

new topic     » topic index » view message » categorize

2. Re: Characters in sequences

dstanger at belco.bc.ca wrote:
> ...
> This is a ridiculously easy question I am sure, but, how does one
> put text inside a sequence. Here is what I am trying:
> 
> sequence word
> word = {"Hello there"}
> 
> puts(1,word)
> 
> When I try to run this I am told "Sequence found inside a 
> character string".
> 
> What am I doing wrong?
> 

Hi David,
it's less complicated: if you write instead:

 sequence word
 word = "Hello there" -- not included in {}

than it should work.

For you wrote instead a string inside a sequence, it should also work
with:

 puts(1,word[1]) -- which is the first element of the sequence,
		 -- which is the string.  

> Also, has anyone else been able to run the tutorial file GETC.ex? When I try
> to run it it cannot find the file that it wants even though it is in the
> same directory and everything.

This works on my machine. Did you follow the instructions written inside
getc.ex?

Have a nice day, Rolf

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu