Simple References

Prev Next

Introduction

The following exmaple shows how a simple reference is designed and describes how to use the '^' symbol to do a reference.
Simple References to Variables

       a[]    = Hello;
       ref1[] =^ a[]; // ref1[] references a[]

       a[]    = Hi;
       echo( a[],", ",ref1[] ); // Outputs "Hi, Hi"

       ref1[] = He;
       echo( a[],", ",ref1[] ); // Outputs "He, He"
Hi, Hi
He, He
Try it yourself: Open LAN_Features_simple_references_to_variables.b4p in B4P_Examples.zip. Decompress before use.