<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://graalonline.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Julien</id>
	<title>Graal Bible - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://graalonline.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Julien"/>
	<link rel="alternate" type="text/html" href="https://graalonline.net/Special:Contributions/Julien"/>
	<updated>2026-04-09T22:54:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.4</generator>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19779</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19779"/>
		<updated>2013-06-06T08:52:47Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* Language Elements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ([[#string type|string type]]).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like [[#int type|int]], '''number''', [[#string type|string]].&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
====boolean type====&lt;br /&gt;
Enables to define variables, function parameters or return values with two possible values, '''true''' or '''false'''. These values represents the result of logical expressions.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var graal_is_cool : '''boolean''' = true;&lt;br /&gt;
 var is_dark : '''boolean''' = false;&lt;br /&gt;
 var is_light : '''boolean''' = !is_dark;&lt;br /&gt;
&lt;br /&gt;
====int type====&lt;br /&gt;
Enables to define variables, function parameters or return values with a 32-bit signed integer number type.&lt;br /&gt;
&lt;br /&gt;
With this type, you can define integer numbers between -2,147,483,648 (-2 ^ 31) and 2,147,483,647 (2 ^ 31 - 1).&amp;lt;br/&amp;gt;&lt;br /&gt;
To work with floating-point numbers, or define numbers outside this range, the '''number''' type must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var integer_number : '''int''' = 123;&lt;br /&gt;
&lt;br /&gt;
====string type====&lt;br /&gt;
Represents textual data using a string of characters.&amp;lt;br/&amp;gt;&lt;br /&gt;
A string cannot be null but may be empty (with a length of zero).&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var text : '''string''' = &amp;quot;hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
====void type====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 function ''function_name''( ... ) : '''void''' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies that a function does not return any value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Only empty return statements must be used in functions with '''void''' type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 function emptyFunction() : '''void''' {&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function logMessage(message : string, hasLog : boolean) : '''void''' {&lt;br /&gt;
    if (!hasLog)&lt;br /&gt;
       return; // No returned value.&lt;br /&gt;
    echo(message);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Declaration Keywords===&lt;br /&gt;
====const keyword====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 '''const''' ''constant_name'' : type = constant_value;&lt;br /&gt;
&lt;br /&gt;
Specifies a variable with a unique and constant value at compilation and execution time.&amp;lt;br/&amp;gt;&lt;br /&gt;
Constants are automatically inlined to their value by the compiler, so it is recommended for optimization purposes to prefer constants to normal variables when their value never changes.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 const winning_points : int = 1000;&lt;br /&gt;
 const hello_text : string = &amp;quot;hello&amp;quot;;&lt;br /&gt;
 const world_text : string = &amp;quot;world&amp;quot;;&lt;br /&gt;
 const hello_world_text : string = hello_text @ world_text;&lt;br /&gt;
 winning_points = 500; // KO as winning_points must be constant&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19778</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19778"/>
		<updated>2013-06-06T08:41:01Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* Types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ([[#string type|string type]]).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like [[#int type|int]], '''number''', [[#string type|string]].&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
====boolean type====&lt;br /&gt;
Enables to define variables, function parameters or return values with two possible values, '''true''' or '''false'''. These values represents the result of logical expressions.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var graal_is_cool : '''boolean''' = true;&lt;br /&gt;
 var is_dark : '''boolean''' = false;&lt;br /&gt;
 var is_light : '''boolean''' = !is_dark;&lt;br /&gt;
&lt;br /&gt;
====int type====&lt;br /&gt;
Enables to define variables, function parameters or return values with a 32-bit signed integer number type.&lt;br /&gt;
&lt;br /&gt;
With this type, you can define integer numbers between -2,147,483,648 (-2 ^ 31) and 2,147,483,647 (2 ^ 31 - 1).&amp;lt;br/&amp;gt;&lt;br /&gt;
To work with floating-point numbers, or define numbers outside this range, the '''number''' type must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var integer_number : '''int''' = 123;&lt;br /&gt;
&lt;br /&gt;
====string type====&lt;br /&gt;
Represents textual data using a string of characters.&amp;lt;br/&amp;gt;&lt;br /&gt;
A string cannot be null but may be empty (with a length of zero).&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var text : '''string''' = &amp;quot;hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
====void type====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 function ''function_name''( ... ) : '''void''' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies that a function does not return any value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Only empty return statements must be used in functions with '''void''' type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 function emptyFunction() : '''void''' {&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function logMessage(message : string, hasLog : boolean) : '''void''' {&lt;br /&gt;
    if (!hasLog)&lt;br /&gt;
       return; // No returned value.&lt;br /&gt;
    echo(message);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19777</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19777"/>
		<updated>2013-06-06T08:40:16Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* Types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ([[#string type|string type]]).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like [[#int type|int]], '''number''', [[#string type|string]].&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
====boolean type====&lt;br /&gt;
Enables to define variables, function parameters or return values with two possible values, '''true''' or '''false'''. These values represents the result of logical expressions.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var graal_is_cool : boolean = true;&lt;br /&gt;
 var is_dark : boolean = false;&lt;br /&gt;
 var is_light : boolean = !is_dark;&lt;br /&gt;
&lt;br /&gt;
====int type====&lt;br /&gt;
Enables to define variables, function parameters or return values with a 32-bit signed integer number type.&lt;br /&gt;
&lt;br /&gt;
With this type, you can define integer numbers between -2,147,483,648 (-2 ^ 31) and 2,147,483,647 (2 ^ 31 - 1).&amp;lt;br/&amp;gt;&lt;br /&gt;
To work with floating-point numbers, or define numbers outside this range, the '''number''' type must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var integer_number : int = 123;&lt;br /&gt;
&lt;br /&gt;
====string type====&lt;br /&gt;
Represents textual data using a string of characters.&amp;lt;br/&amp;gt;&lt;br /&gt;
A string cannot be null but may be empty (with a length of zero).&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var text : '''string''' = &amp;quot;hello&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
====void type====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 function ''function_name''( ... ) : '''void''' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies that a function does not return any value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Only empty return statements must be used in functions with '''void''' type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 function emptyFunction() : '''void''' {&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function logMessage(message : string, hasLog : boolean) : '''void''' {&lt;br /&gt;
    if (!hasLog)&lt;br /&gt;
       return; // No returned value.&lt;br /&gt;
    echo(message);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19776</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19776"/>
		<updated>2013-06-06T08:32:23Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* as operator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ([[#string type|string type]]).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like [[#int type|int]], '''number''', [[#string type|string]].&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
====int type====&lt;br /&gt;
Enables to define variables, function parameters or return values with a 32-bit signed integer number type.&lt;br /&gt;
&lt;br /&gt;
With this type, you can define integer numbers between -2,147,483,648 (-2 ^ 31) and 2,147,483,647 (2 ^ 31 - 1).&amp;lt;br/&amp;gt;&lt;br /&gt;
To work with floating-point numbers, or define numbers outside this range, the '''number''' type must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var integer_number : int = 123;&lt;br /&gt;
 echo(123); // 123&lt;br /&gt;
&lt;br /&gt;
====string type====&lt;br /&gt;
Represents textual data using a string of characters.&amp;lt;br/&amp;gt;&lt;br /&gt;
A string cannot be null but may be empty (with a length of zero).&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var text : '''string''' = &amp;quot;hello&amp;quot;;&lt;br /&gt;
 echo(text); // &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====void type====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 function ''function_name''( ... ) : '''void''' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies that a function does not return any value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Only empty return statements must be used in functions with '''void''' type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 function emptyFunction() : '''void''' {&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function logMessage(message : string, hasLog : boolean) : '''void''' {&lt;br /&gt;
    if (!hasLog)&lt;br /&gt;
       return; // No returned value.&lt;br /&gt;
    echo(message);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19775</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19775"/>
		<updated>2013-06-06T08:32:00Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* append (@) operator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ([[#string type|string type]]).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like [[#int type|int]], '''number''', '''string'''.&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
====int type====&lt;br /&gt;
Enables to define variables, function parameters or return values with a 32-bit signed integer number type.&lt;br /&gt;
&lt;br /&gt;
With this type, you can define integer numbers between -2,147,483,648 (-2 ^ 31) and 2,147,483,647 (2 ^ 31 - 1).&amp;lt;br/&amp;gt;&lt;br /&gt;
To work with floating-point numbers, or define numbers outside this range, the '''number''' type must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var integer_number : int = 123;&lt;br /&gt;
 echo(123); // 123&lt;br /&gt;
&lt;br /&gt;
====string type====&lt;br /&gt;
Represents textual data using a string of characters.&amp;lt;br/&amp;gt;&lt;br /&gt;
A string cannot be null but may be empty (with a length of zero).&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var text : '''string''' = &amp;quot;hello&amp;quot;;&lt;br /&gt;
 echo(text); // &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====void type====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 function ''function_name''( ... ) : '''void''' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies that a function does not return any value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Only empty return statements must be used in functions with '''void''' type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 function emptyFunction() : '''void''' {&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function logMessage(message : string, hasLog : boolean) : '''void''' {&lt;br /&gt;
    if (!hasLog)&lt;br /&gt;
       return; // No returned value.&lt;br /&gt;
    echo(message);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19774</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19774"/>
		<updated>2013-06-06T08:31:06Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* Types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ('''string''' type).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like [[#int type|int]], '''number''', '''string'''.&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
====int type====&lt;br /&gt;
Enables to define variables, function parameters or return values with a 32-bit signed integer number type.&lt;br /&gt;
&lt;br /&gt;
With this type, you can define integer numbers between -2,147,483,648 (-2 ^ 31) and 2,147,483,647 (2 ^ 31 - 1).&amp;lt;br/&amp;gt;&lt;br /&gt;
To work with floating-point numbers, or define numbers outside this range, the '''number''' type must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var integer_number : int = 123;&lt;br /&gt;
 echo(123); // 123&lt;br /&gt;
&lt;br /&gt;
====string type====&lt;br /&gt;
Represents textual data using a string of characters.&amp;lt;br/&amp;gt;&lt;br /&gt;
A string cannot be null but may be empty (with a length of zero).&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var text : '''string''' = &amp;quot;hello&amp;quot;;&lt;br /&gt;
 echo(text); // &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====void type====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 function ''function_name''( ... ) : '''void''' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies that a function does not return any value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Only empty return statements must be used in functions with '''void''' type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 function emptyFunction() : '''void''' {&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function logMessage(message : string, hasLog : boolean) : '''void''' {&lt;br /&gt;
    if (!hasLog)&lt;br /&gt;
       return; // No returned value.&lt;br /&gt;
    echo(message);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19773</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19773"/>
		<updated>2013-06-06T08:24:35Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* as operator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ('''string''' type).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like [[#int type|int]], '''number''', '''string'''.&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
====int type====&lt;br /&gt;
Enables to define variables, function parameters or return values with a 32-bit signed integer number type.&lt;br /&gt;
&lt;br /&gt;
With this type, you can define integer numbers between -2,147,483,648 (-2 ^ 31) and 2,147,483,647 (2 ^ 31 - 1).&amp;lt;br/&amp;gt;&lt;br /&gt;
To work with floating-point numbers, or define numbers outside this range, the '''number''' type must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var integer_number : int = 123;&lt;br /&gt;
 echo(123); // 123&lt;br /&gt;
&lt;br /&gt;
====void type====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 function ''function_name''( ... ) : '''void''' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies that a function does not return any value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Only empty return statements must be used in functions with '''void''' type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 function emptyFunction() : '''void''' {&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function logMessage(message : string, hasLog : boolean) : '''void''' {&lt;br /&gt;
    if (!hasLog)&lt;br /&gt;
       return; // No returned value.&lt;br /&gt;
    echo(message);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19772</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19772"/>
		<updated>2013-06-06T08:24:14Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* addition assignment (+=) operator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ('''string''' type).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like '''int''', '''number''', '''string'''.&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
====int type====&lt;br /&gt;
Enables to define variables, function parameters or return values with a 32-bit signed integer number type.&lt;br /&gt;
&lt;br /&gt;
With this type, you can define integer numbers between -2,147,483,648 (-2 ^ 31) and 2,147,483,647 (2 ^ 31 - 1).&amp;lt;br/&amp;gt;&lt;br /&gt;
To work with floating-point numbers, or define numbers outside this range, the '''number''' type must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var integer_number : int = 123;&lt;br /&gt;
 echo(123); // 123&lt;br /&gt;
&lt;br /&gt;
====void type====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 function ''function_name''( ... ) : '''void''' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies that a function does not return any value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Only empty return statements must be used in functions with '''void''' type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 function emptyFunction() : '''void''' {&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function logMessage(message : string, hasLog : boolean) : '''void''' {&lt;br /&gt;
    if (!hasLog)&lt;br /&gt;
       return; // No returned value.&lt;br /&gt;
    echo(message);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19771</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19771"/>
		<updated>2013-06-06T08:23:29Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* addition (+) operator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ([[#int type|int]] or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ('''string''' type).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like '''int''', '''number''', '''string'''.&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
====int type====&lt;br /&gt;
Enables to define variables, function parameters or return values with a 32-bit signed integer number type.&lt;br /&gt;
&lt;br /&gt;
With this type, you can define integer numbers between -2,147,483,648 (-2 ^ 31) and 2,147,483,647 (2 ^ 31 - 1).&amp;lt;br/&amp;gt;&lt;br /&gt;
To work with floating-point numbers, or define numbers outside this range, the '''number''' type must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var integer_number : int = 123;&lt;br /&gt;
 echo(123); // 123&lt;br /&gt;
&lt;br /&gt;
====void type====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 function ''function_name''( ... ) : '''void''' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies that a function does not return any value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Only empty return statements must be used in functions with '''void''' type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 function emptyFunction() : '''void''' {&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function logMessage(message : string, hasLog : boolean) : '''void''' {&lt;br /&gt;
    if (!hasLog)&lt;br /&gt;
       return; // No returned value.&lt;br /&gt;
    echo(message);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19770</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19770"/>
		<updated>2013-06-06T08:21:29Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* Types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ('''string''' type).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like '''int''', '''number''', '''string'''.&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
====int type====&lt;br /&gt;
Enables to define variables, function parameters or return values with a 32-bit signed integer number type.&lt;br /&gt;
&lt;br /&gt;
With this type, you can define integer numbers between -2,147,483,648 (-2 ^ 31) and 2,147,483,647 (2 ^ 31 - 1).&amp;lt;br/&amp;gt;&lt;br /&gt;
To work with floating-point numbers, or define numbers outside this range, the '''number''' type must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var integer_number : int = 123;&lt;br /&gt;
 echo(123); // 123&lt;br /&gt;
&lt;br /&gt;
====void type====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 function ''function_name''( ... ) : '''void''' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies that a function does not return any value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Only empty return statements must be used in functions with '''void''' type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 function emptyFunction() : '''void''' {&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function logMessage(message : string, hasLog : boolean) : '''void''' {&lt;br /&gt;
    if (!hasLog)&lt;br /&gt;
       return; // No returned value.&lt;br /&gt;
    echo(message);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19769</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19769"/>
		<updated>2013-06-06T08:10:28Z</updated>

		<summary type="html">&lt;p&gt;Julien: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ('''string''' type).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like '''int''', '''number''', '''string'''.&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
====void type====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 function ''function_name''( ... ) : '''void''' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies that a function does not return any value.&amp;lt;br/&amp;gt;&lt;br /&gt;
Only empty return statements must be used in functions with '''void''' type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 function emptyFunction() : '''void''' {&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function logMessage(message : string, hasLog : boolean) : '''void''' {&lt;br /&gt;
    if (!hasLog)&lt;br /&gt;
       return; // No returned value.&lt;br /&gt;
    echo(message);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19768</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19768"/>
		<updated>2013-06-05T14:49:07Z</updated>

		<summary type="html">&lt;p&gt;Julien: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ('''string''' type).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like '''int''', '''number''', '''string'''.&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal { ... }&lt;br /&gt;
 class Cat extends Animal { ... }&lt;br /&gt;
 class Dog extends Animal { ... }&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;br /&gt;
&lt;br /&gt;
====type (:) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 var ''variable_name'' ''':''' ''type''&lt;br /&gt;
 function ''function_name''(''parameter'' ''':''' ''type'', ...) ''':''' ''return_type'' { ... }&lt;br /&gt;
&lt;br /&gt;
Specifies the type for a variable or function declaration.&amp;lt;br/&amp;gt;&lt;br /&gt;
For functions, this operator must be used to specify the return type, and the type of parameters if any.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var language ''':''' string = &amp;quot;GScript&amp;quot;;&lt;br /&gt;
 var version ''':''' int = 3;&lt;br /&gt;
 &lt;br /&gt;
 function sayHello() ''':''' void {&lt;br /&gt;
    echo(&amp;quot;hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function addNumbers(a : int, b : int) : int {&lt;br /&gt;
    return a + b;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19767</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19767"/>
		<updated>2013-06-05T14:37:12Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* as operator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ('''string''' type).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like '''int''', '''number''', '''string'''.&amp;lt;br&amp;gt;&lt;br /&gt;
The source type must be a member of the target type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal {};&lt;br /&gt;
 class Cat extends Animal {};&lt;br /&gt;
 class Dog extends Animal {};&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type is a member of the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type is not a member of the Dog type.&lt;br /&gt;
 var cat_as_animal_as_dog : Dog = cat_as_animal as Dog; // null as the Cat as Animal type is not a member of the Dog type.&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19766</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19766"/>
		<updated>2013-06-05T14:19:39Z</updated>

		<summary type="html">&lt;p&gt;Julien: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ('''string''' type).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====as operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''expression'' '''as''' ''target_type''&lt;br /&gt;
&lt;br /&gt;
Converts the source type of ''expression'' to ''target_type''.&amp;lt;br/&amp;gt;&lt;br /&gt;
The target type must be an object type, not a basic type like '''int''', '''number''', '''string'''.&amp;lt;br&amp;gt;&lt;br /&gt;
Each type must either extend of be equal to the other type.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 class Animal {};&lt;br /&gt;
 class Cat extends Animal {};&lt;br /&gt;
 class Dog extends Animal {};&lt;br /&gt;
 var cat : Cat = new Cat();&lt;br /&gt;
 var dog : Dog = new Dog();&lt;br /&gt;
 var cat_as_animal : Animal =  cat as Animal; // OK as the Cat type extends the Animal type.&lt;br /&gt;
 var cat_as_cat : Cat = cat_as_animal as Cat; // OK as the Cat type extends the Animal type.&lt;br /&gt;
 var cat_as_dog : Dog = cat as Dog; // KO as the Cat type does not extend the Dog type.&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19765</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19765"/>
		<updated>2013-06-05T13:42:48Z</updated>

		<summary type="html">&lt;p&gt;Julien: /* addition assignment (+=) operator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (@=) operator|append assignment (@=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ('''string''' type).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19764</id>
		<title>Creation/Dev/GScript3</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript3&amp;diff=19764"/>
		<updated>2013-06-05T13:41:19Z</updated>

		<summary type="html">&lt;p&gt;Julien: Created page with 'Category:Scripting Reference '''GScript3''' is the latest version of the Graal's scripting language.&amp;lt;br/&amp;gt; It introduces new syntax and semantic eleme…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Scripting Reference]]&lt;br /&gt;
'''GScript3''' is the latest version of the [[Creation/Dev/GScript|Graal's scripting language]].&amp;lt;br/&amp;gt;&lt;br /&gt;
It introduces new syntax and semantic elements, and enable new features in Web browsers.&lt;br /&gt;
&lt;br /&gt;
==Language Elements==&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
====addition (+) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Adds together ''numeric_expression1'' and ''numeric_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append (@) operator|append (@) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(1 + 2); // 3&lt;br /&gt;
 echo(1.5 + 2.25); // 3.75&lt;br /&gt;
&lt;br /&gt;
====addition assignment (+=) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''numeric_expression1'' '''+=''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
Puts the result of ''numeric_expression1'' '''+''' ''numeric_expression2'' into ''numeric_expression1''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be numeric ('''int''' or '''number''' types).&lt;br /&gt;
&lt;br /&gt;
This is a direct equivalent of the following expression:&lt;br /&gt;
 ''numeric_expression1'' '''=''' ''numeric_expression1'' '''+''' ''numeric_expression2''&lt;br /&gt;
&lt;br /&gt;
To concatenate strings, the [[#append assignment (+=) operator|append assignment (+=) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 var result : int = 10;&lt;br /&gt;
 result '''+=''' 20;&lt;br /&gt;
 echo(result); // 30&lt;br /&gt;
&lt;br /&gt;
====append (@) operator====&lt;br /&gt;
'''Usage'''&lt;br /&gt;
 ''string_expression1'' '''@''' ''string_expression2''&lt;br /&gt;
&lt;br /&gt;
Concats together ''string_expression1'' and ''string_expression2''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Both expressions must be string ('''string''' type).&lt;br /&gt;
&lt;br /&gt;
To add numbers, the [[#addition (+) operator|addition (+) operator]] must be used instead.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
 echo(&amp;quot;hello &amp;quot; '''@''' &amp;quot;world&amp;quot;); // &amp;quot;hello world&amp;quot;&lt;/div&gt;</summary>
		<author><name>Julien</name></author>
	</entry>
</feed>