en:presentation

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
en:presentation [2026/03/08 17:26] – [W Language Description] rooten:presentation [2026/04/03 12:13] (Version actuelle) root
Ligne 4: Ligne 4:
 Comments are written after the semicolon (;). They can appear either alone on a line or at the end of a line after an instruction. Comments are written after the semicolon (;). They can appear either alone on a line or at the end of a line after an instruction.
 Empty lines are considered comments. Empty lines are considered comments.
-<code w>+<code wlang>
 ; First comment ; First comment
      ; Other comment      ; Other comment
Ligne 20: Ligne 20:
 During execution, any exception automatically causes a jump to the beginning of the exception block of the current program or subroutine. This is the equivalent of a systematic ''try/catch'' loop. During execution, any exception automatically causes a jump to the beginning of the exception block of the current program or subroutine. This is the equivalent of a systematic ''try/catch'' loop.
 Let's revisit the classic //Hello world// example : Let's revisit the classic //Hello world// example :
-<code hello.w>+<code wlang hello.w>
 ; classic example... ; classic example...
  
Ligne 37: Ligne 37:
  
 The source file to be included must be located in the [[w:env|WSRC]] directory. The source file to be included must be located in the [[w:env|WSRC]] directory.
-<code w>+<code wlang>
 include "calcul.w" include "calcul.w"
 </code> </code>
Ligne 48: Ligne 48:
 ==== Data Types ==== ==== Data Types ====
 Variables must be declared, but without a type, and can be declared anywhere in the code. They only become usable after their declaration; otherwise, an exception will be thrown. Variables must be declared, but without a type, and can be declared anywhere in the code. They only become usable after their declaration; otherwise, an exception will be thrown.
-<code w>+<code wlang>
 ; declaration of 3 variables ; declaration of 3 variables
 declare x, y, tmp declare x, y, tmp
Ligne 71: Ligne 71:
 === Usage === === Usage ===
 Variables are assigned using the //let// statement. It is possible to //de-assign// a variable with the //delet// instruction. In this case, the variable is deleted and is no longer declared. Adding variables to a Hashtable does not require declaration, but they are assigned and unassigned like other variables. The syntax to use is ''<varht>.<member>'' Variables are assigned using the //let// statement. It is possible to //de-assign// a variable with the //delet// instruction. In this case, the variable is deleted and is no longer declared. Adding variables to a Hashtable does not require declaration, but they are assigned and unassigned like other variables. The syntax to use is ''<varht>.<member>''
-<code w>+<code wlang>
 declare h, n, d declare h, n, d
  
Ligne 90: Ligne 90:
  
 Example Example
-<code w>+<code wlang>
 begin test begin test
   declare x   declare x
  • en/presentation.1772990808.txt.gz
  • Dernière modification : 2026/03/08 17:26
  • de root