Fulltext results:
- functions
- myrec.val = 'Original' print myrec.val def modify(r) r.val = 'Changed' end modify(myrec) print myrec.val Output: Original Changed ... on has its own local namespace and may access the module's global namespace. a = 'global scope' de
- scopes
- lowing scopes (namespaces) are defined: * Each module has its own global scope. * Each function ha... signment '':='' operator inserts variables to the module's global namespace. a = 1 def globalAssig... a: hello b: world ===== Importing modules ===== The ''import'' keyword is used to import modules. All built-in modules and all script files on
- records
- foundation of Doomsday Script. Each namespace and module is a record, each object is a record, and classes are records, too. The ownership model of records is that there is always a single own... records are owned by native code (e.g., built-in modules like ''Core''), but may still be referenced b... sses. This means that, for instance, an imported module could be used as a class. Setting up the sup
- statements_and_compounds
- o the same variable. i = "abc" Arrays are modifiable, so one can change the value of an individ... ], 4 ] One can assign to dictionaries to add or modify the values of keys. $ d = {1:2, 'Three':4... y = array array[1] = 10 # origArray remains unmodified ==== Weak assignment ==== Weak assignment ''?='' only creates new variables. It never modifies existing ones. $ print "z exists?", 'z' i
- operator_expressions
- /root/location' Absolute: /root/location ===== Modulo ===== Modulo converts number arguments to integers. $ print 'Numbers:', 7 % 3 Numbers: 1 ''%
- basic_expressions
- ontents of a serialized block of memory cannot be modified via Doomsday Script. $ a = [1, 'One', {1: