AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YDAT | YWAIT | Byzgraf | FAQs
Object typedict
 
A variable that is declared to be an Object accepts any value, and its type is whatever is currently stored in that variable. Uninitialized Object variables, no matter where they happen to be declared, always start as NULL.
 
 Example:   The program,
import yoix.*.*;

Object  o1;
Object  o2 = 12;
Object  o3 = sin(PI/4);
Object  o4 = "Now is the time";

printf("o1=%O, o2=%O, o3=%O, o4=%O\n", o1, o2, o3, o4);
o1 = o2;
o2 = o3;
o3 = o4;
o4 = NULL;
printf("o1=%O, o2=%O, o3=%O, o4=%O\n", o1, o2, o3, o4);
prints
o1=NULL:POINTER, o2=12, o3=0.7071067811865475, o4=Now is the time
o1=12, o2=0.7071067811865475, o3=Now is the time, o4=NULL:POINTER
on standard output.
 
 See Also:   Builtin, Callable, Function, Number, Pointer

 

Yoix is a registered trademark of AT&T Intellectual Property.