Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
custom:javascript [2018/12/27 19:47] – Added link to JS Libraries index digital mancustom:javascript [2018/12/27 20:03] – [load] include link to 'load' dir page, use writeln() intead of print() in examples digital man
Line 76: Line 76:
 The Synchronet JavaScript object model includes a global method: ''load()'' (a closely-related ''require()'' method was added in v3.17). The Synchronet JavaScript object model includes a global method: ''load()'' (a closely-related ''require()'' method was added in v3.17).
  
-The ''load'' method is used to compile and execute an external script from within a //parent// script. It is most often used to load numeric constants and object definitions from files in the ''[[dir:exec]]/load'' directory as these definitions (e.g. ''sbbsdefs.js'') and object libraries (e.g. ''graphic.js'') enable code re-use and sharing among modules, saving us JS programmers and lot of typing and redundancy.+The ''load'' method is used to compile and execute an external script from within a //parent// script. It is most often used to load numeric constants and object definitions from files in the ''[[dir:exec]]/[[dir:load]]'' directory as these definitions (e.g. ''sbbsdefs.js'') and object libraries (e.g. ''graphic.js'') enable code re-use and sharing among modules, saving us JS programmers and lot of typing and redundancy.
  
 There are 3 primary ways to use the ''load'' method: There are 3 primary ways to use the ''load'' method:
Line 89: Line 89:
 var queue = load(true, 'myscript.js', 1, 2, 3); var queue = load(true, 'myscript.js', 1, 2, 3);
 var value = queue.read(1000); var value = queue.read(1000);
-print(value);+writeln(value);
 </code> </code>
  
Line 110: Line 110:
 lib.do_thing(); lib.do_thing();
 if(lib.status_good == true) if(lib.status_good == true)
-    print('good');+    writeln('good');
 else else
     alert('bad');     alert('bad');