Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

word datatype was contexts

 [1/1] from: rotenca::telvia::it at: 17-Sep-2001 14:07


> again, Romano,
hi, Joel, Thank you for the explanation, now i see things more clearly.
> Actually, it does... In the on-line version of RCUG (the > quickest one for me to check), section 5.1 "Word Names",
<<quoted lines omitted: 5>>
> also some restrictions on words that could be interpreted > as numbers. For example, -1 and +1 are numbers, not words.
Yes, i've found it. Appendix A-79.
> The statements you quoted above from RCUG are really talking > about the standard rules by which REBOL translates text into > internal values. They don't mean that that you can't override > the normal assumptions and force REBOL to create values (e.g. > words) out of something that doesn't follow the standard rules.
They don't say neither than horse can fly.... :-)
> >> confusion: reduce [to-set-word "%yikes" 2.54] > == [%yikes: 2.54]
<<quoted lines omitted: 10>>
> prompt, REBOL applies the normal rules and translates the > next thing after PRINT into a file name.
I forgot than the input from console go to Load which applies "normal rules"...
> In order to get > back to the word we created with the non-standard name, we > have to override the rules again... > > >> print get to-word "%yikes" > 2.54
And also:
>> get first confusion
== 2.54 in this case I over-pass Load. But there is another thing: every datatype has own rules, we can't trasform anything in anything. to-issue put always (i think) a "#" in front of any string, you can't force this. to-integer doesn't like the number: "i'm not a number" So, some rules exist for every datatype. The only rule i can find for word! is length? string >0 Conclusion: we can't made any assuntion on the mold format of any word. But now i ask me: what are the true rules (beyond Load) of every datatype?
> Hope this helps!
Very, very useful and clear!
> -jn-
--- Ciao Romano

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted