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:

variable.JPG

Open Screenshot

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

2 Responses to “Creating Variable in DLR (DLR Language - Part 2)”

  1. jimmy Says:

    I heard on Creating Variable in DLR (DLR Language - Part 2) from my mate Bartel . This is glorious knowledge and also very accurate .

  2. protsyk.com » Blog Archive » Expression evaluator in 15 minutes with Irony & Dlr Says:

    […] DLR Language Part 2 […]

Bookmark and Share

Leave a Reply

Add Webcam or
Audio-only Comment