|REBOL 3 Docs||Guide||Concepts||Functions||Datatypes||Errors|
|TOC < Back Next >||Updated: 26-Apr-2009 Edit History|
This is a very common error. It means that your code tried to evaluate a word that was not defined. Simply, it had no value associated with it, as explained in expressions: values.
If you are sure that the word was defined, then the problem could be that the word was defined in a different context than where it was used.
For example, if foo is not defined in the global context:
>> foo ** Script Error: foo has no value
Here foo is defined in an object!, but still not in the global context:
>> test: object [foo: 10] >> foo ** Script Error: foo has no value
Similarly for foo when defined in a function!, but an attempt is made to use it outside that function:
>> test: func [arg /local foo] [arg + foo] >> foo ** Script Error: foo has no value
You can use value? to check if a word has been defined in context.
|TOC < Back Next >||REBOL.com - WIP Wiki||Feedback Admin|