User Tools

Site Tools


scripting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
scripting [2020/07/10 08:29] tondosescripting [2020/07/10 09:24] tondose
Line 27: Line 27:
  
  
-==== Creating Code ====+===== Creating Code ====
 + 
 +The code can simply be typed into a text editor. Windows-supplied ''notepad.exe'' does the trick flawlessly, however, for major projects the use of some dedicated code editor, like [[https://notepad-plus-plus.org|Notepad++]] might be considered. The finished code is to be saved in UTF-8 format into a file **with the extension ''.mls''**. 
 + 
 +The structure of a simple Delphi/Turbopascal programme is as follows: 
 + 
 +<code delphi> 
 + 
 +const 
 +  // Constant declarations 
 + 
 +VAR 
 +  // Variable declarations 
 + 
 +{ Subprogramme definitions } 
 + 
 +procedure DoSomething; 
 +begin 
 +  // Executable statements 
 +end; 
 + 
 +(* Main programme *) 
 + 
 +begin 
 +  // Executable statements 
 +end. 
 + 
 +</code> 
 + 
 +**Note** the different use of semicolon '' ; '' and period '' . '' in subprogramme and main programme respectively. 
 + 
 +**Comments** may be typed into ''{''curly brackets''}'', a combination of ''(*''parentheses and asterisk''*)'' or behind a ''<nowiki>//</nowiki>'' double slash. While the former two can be expanded over multiple lines, the latter works for a single line or part of it only. 
 + 
 +It is highly recommended to structure the code by indenting the statements with two whitespaces at a time. Examples can be found in the [[https://community.mairlist.com/|Support Forum]], however, at the time being, in German language only. {{:wiki:zeichen_123_-_arbeitsstelle_stvo_2013.svg.png?nolink&20|}} 
 + 
 + 

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki