Howto:Start using vectors and hashes in Nasal: Difference between revisions

Jump to navigation Jump to search
m
Grammar. Getting late, is it? ;-
m (correction)
m (Grammar. Getting late, is it? ;-)
Line 1: Line 1:
{{Nasal Navigation}}
{{Nasal Navigation}}


Here we look into how to '''start using vectors and hashes in Nasal''' to simplify and generalize code.  Vectors and hashes are two data structures that [[Nasal]] uses to store data.  Vectors are in some other programming languages called for example lists or one-dimensional arrays, and hashes is similar to C's structs.
Here we look into how to '''start using vectors and hashes in Nasal''' to simplify and generalize code.  Vectors and hashes are two data structures that [[Nasal]] uses to store data.  Vectors are in some other programming languages called for example lists or one-dimensional arrays, and hashes are similar to C's structs.


In many cases repetitive code can be generalized and rewritten into vectors, hashes or helper functions using them.  Some of the advantages with rewriting repetitive code this way is that it helps maintenance by requiring less typing when modifying and/or when fixing bugs.
In many cases repetitive code can be generalized and rewritten into vectors, hashes or helper functions using them.  Some of the advantages with rewriting repetitive code this way is that it helps maintenance by requiring less typing when modifying and/or when fixing bugs.

Navigation menu