lotus



previous page: L02) What changes have been made to the BETA language definition?
  
page up: BETA Programming Language FAQ
  
next page: L02.2) Simple If

L02.1) String Literals as References




Description

This article is from the FAQ, by with numerous contributions by others.

L02.1) String Literals as References

The pattern text enters and exits a char repetition. This means, that a text
may be initialized using constant strings as follows:

t: @text;
do 'hello' -> t;

Many operations involving texts, however, takes references to texts as
enter/exit parameters. This is mainly for efficiency reasons.

To allow easy invocation of such operations on string literals, the
following is also allowed:

t: ^text;
do 'hello' -> t[];

The semantics of this is, that a text object is instantiated, initialized by
the constant string, and finally assigned to the text reference.

 

Continue to:















TOP
previous page: L02) What changes have been made to the BETA language definition?
  
page up: BETA Programming Language FAQ
  
next page: L02.2) Simple If