Creating Variable in DLR (DLR Language - Part 2)
DLR Variable Assignment(Src & Binary)
Creating a variable is not an easy task in DLR. There are different types of variables and different issues (like binding, etc.). Let’s consider the easiest way of using variable.
The variable may be created inside CodeBlock. CodeBlock captures a block of code that should correspond to a .NET method body:
They we will create an Ast which writes value 3 to the variable (consider second red rectangle on the image).
The output of code above should be the following AST and result:
//
// AST
//
.codeblock Object Script ()() {
.var Int32 hello (Global,InParameterArray){
(.bound hello) = 3;
.return (.bound hello);
}
}
Result:3
April 25th, 2008 at 2:33 pm
I heard on Creating Variable in DLR (DLR Language - Part 2) from my mate Bartel . This is glorious knowledge and also very accurate .
January 15th, 2009 at 9:54 am
[…] DLR Language Part 2 […]