Aller au contenu principal

ref

Return the value of a variable

REF

NAME

ref - Return the value of a variable

SYNOPSIS

ref (string);

DESCRIPTION

This function is used to return the content of a variable.

The parameter string containt the name of the variable.

EXAMPLES

         a=5;

        b1 = "a";
        ref("b" .+ "1");

return a

        a=5;
        b1 = "a";
        ref(ref("b" .+ "1"));

ruturn res=5.

        a="/html/test8.sn";
        b = "a";
        if ref(b) eq a then
            "ok";
        else
            "beeug";
        endif

return res=ok.

        a="/html/test8.sn";
        b = "a";
        if ref("a") eq a then
            "ok";
        else
            "beeug";
        endif
return res=ok.

        a="/html/test8.sn";
        b = "a";
        if a eq ref("a") then
            "ok";
        else
            "beeug";
        endif
return res=ok.

        a="/html/test8.sn";
        b = "a";
        if -e ref(b) then
            "ok";
        else
            "beeug";
        endif
return res=ok.

        abc = 5;
        a = "a";
        b = "b";
        c = "c";
        ref(a .+ b .+ c);
return res=5.

        abc = 5;
        a = "a";
        b = "b";
        c = "c";
        d = "d";
        ref(a .+ b .+ c .+ d);
return res=.

        abc = 5;
        a = "5";
        b = "1";
        c = "2";
        d = "3";
        ref(a .+ b .+ c .+ d);
return res=.

SEE ALSO

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2022 extenso Inc. All rights reserved.