[REBOL] Re: Creating stuff :)
From: mike:yaunish:home at: 28-Apr-2001 17:15
At 04:58 PM 27/04/01 +0200, you wrote:
Are you maybe looking for something like this;
>> question1: 0 ; initialize the word "question1"
== 0
>> set 'question1 99
== 99
>> print question1
99
I think this may answer some questions - but probably not solve your problem.
In your example you are setting two variables when I don't think that is
neccesary.
From your example it looks like your real target action is to get the
questions and
answers into the "file-to-save".
How about:
for count 1 number-of-questions 1 [
;question[count]: data/question[count]
;answer[count]: data/answer[count]
append file-to-save data/question/:count
append file-to-save data/answer/:count
]
If you are using the psuedo variables "question[count]" and "answer[count]"
somewhere
after the loop then you can just use normal variable assignments like:
last-question: data/question/:count
last-answer: data/question/:count
because that is all that those variable will be holding after the loop anyway.
>Hi,
>that's good except for:
>
>** Script Error: question has no value. ** Where: set question/:count
>data/question/:count
>
>I would like to set (for the first iteration)
>
>question1: data/question1
>
>and I guess
>
>set question/:count data/question/:count
>
>isn't quite the same,
>I don't want it in a block, but in a word or variable or whatever it's
>called in rebol :)
>
>/Regards Stefan Falk - www.amigaextreme.com
>
> > -----Original Message-----
> > From: Ingo Hohmann [mailto:[ingo--2b1--de]]
> > Sent: den 26 april 2001 22:19
> > To: [rebol-list--rebol--com]
> > Subject: [REBOL] Re: Creating stuff :)
> >
> >
> > Hi Stefan,
> >
> > I thought I already saw the answer, but seems I just dreamt, so
> > here it is (translating your fantasy example to rebol, the way I
> > understand it ...)
> >
> > Once upon a time [stefan--falk--slg--se] spoketh thus:
> > > for count 1 number-of-questions 1 [
> > > question[count]: data/question[count]
> > > answer[count]: data/answer[count]
> > > append file-to-save question[count]
> > > append file-to-save answer[count]
> > > ]
> >
> > for count 1 number-of-questions 1 [
> > set question/:count data/question/:count ; you have to use
> > set, question/:count: won't work
> > set answer/:count data/answer/:count
> > append file-to-save question/:count
> > append file-to-save answer/:count
> > ]
> >
> >
> > kind regards,
> >
> > Ingo
> >
> > --
> > To unsubscribe from this list, please send an email to
> > [rebol-request--rebol--com] with "unsubscribe" in the
> > subject, without the quotes.
> >
>--
>To unsubscribe from this list, please send an email to
>[rebol-request--rebol--com] with "unsubscribe" in the
>subject, without the quotes.
Mike Yaunish
[mike--yaunish--home--com]