Headings - part 2

Part of the "Working With QuSheet" tutorial for QuSheet   
Part of the "Working With QuSheet" tutorial for QuSheet   
 
 
     
Summary   
    
Headings are not called simply “calculations” because they do not, generally speaking, have to make calculations at all – they can simply be used in the normal sense of the word “heading” with sub-headings placed below them (for example the Leaflet Quick Win scenario). Calculation in a Heading is an option.    
    
Styles control everything about how a Heading’s output is displayed. Indeed every Heading entry has a column to specify the Style that should be used for the entry. Styles are treated in more detail in later tutorials.    
    
Where a Heading is making a calculation, the Heading keeps a running-total to allow a calculation to take place. Starting with an undefined value, each line in a Heading has an operation to modify this running total into either a number, a Boolean (true/false) value or text. When necessary, an "undefined" value is promoted to a suitable value (like 0 if you start adding numbers up) accordingy.    
    
The first column in a Heading line, the “Apply” column, specifies the operation to be performed on the running total. The Operand of the operation, where necessary, is given in the “On” column.    
    
QuSheet does its calculations like a calculator – i.e, not taking into account operator precedence, simply performing one operation after another (e.g. 10 + 10 * 10 comes to 200, not 110).    
    
The “Set” operation sets the running total to the value of the operand    
    
The “Ignore” operation leaves the running total alone    
    
A:
The Igrnore operation also now supports an operand which is undefined – i.e. not found – by silently ignoring the whole line.    
    
Mathematical operations (plus, minus and so on) perform a maths operation between the running total and the operand, setting the result into the running total.    
    
A:
The + and – operations work with text, by causing an “append” or “prepend” of the operand, promoting either running-total or operand to text if necessary first.    
    
Formatted text operations are used to construct text with embedded formatting.    
    
A:
It is now possible to pre-pend formatted text ( -: )    
    
Comparison operations produce a Boolean (yes/no) value.    
    
The “if true then” and “if false then” operations set the running total to the operand if the current running total is true or false respectively.    
 
 
Summary   »  
 
     
View (duration 11m10s)   
        
      
 
 
You will need to view this page on a non-handheld screen to see the presentation.   
 
     
Addenda / Errata   
    
A:
The Igrnore operation also now supports an operand which is undefined – i.e. not found – by silently ignoring the whole line.    
    
A:
The + and – operations work with text, by causing an “append” or “prepend” of the operand, promoting either running-total or operand to text if necessary first.    
    
A:
It is now possible to pre-pend formatted text ( -: )    
 
 
Addenda / Errata   »  
 
     
index previous next    
 
 
index previous next    
 
 

 « Summary

Headings are not called simply “calculations” because they do not, generally speaking, have to make calculations at all – they can simply be used in the normal sense of the word “heading” with sub-headings placed below them (for example the Leaflet Quick Win scenario). Calculation in a Heading is an option.    

Styles control everything about how a Heading’s output is displayed. Indeed every Heading entry has a column to specify the Style that should be used for the entry. Styles are treated in more detail in later tutorials.    

Where a Heading is making a calculation, the Heading keeps a running-total to allow a calculation to take place. Starting with an undefined value, each line in a Heading has an operation to modify this running total into either a number, a Boolean (true/false) value or text. When necessary, an "undefined" value is promoted to a suitable value (like 0 if you start adding numbers up) accordingy.    

The first column in a Heading line, the “Apply” column, specifies the operation to be performed on the running total. The Operand of the operation, where necessary, is given in the “On” column.    

QuSheet does its calculations like a calculator – i.e, not taking into account operator precedence, simply performing one operation after another (e.g. 10 + 10 * 10 comes to 200, not 110).    

The “Set” operation sets the running total to the value of the operand    

The “Ignore” operation leaves the running total alone    

A:
The Igrnore operation also now supports an operand which is undefined – i.e. not found – by silently ignoring the whole line.    

Mathematical operations (plus, minus and so on) perform a maths operation between the running total and the operand, setting the result into the running total.    

A:
The + and – operations work with text, by causing an “append” or “prepend” of the operand, promoting either running-total or operand to text if necessary first.    

Formatted text operations are used to construct text with embedded formatting.    

A:
It is now possible to pre-pend formatted text ( -: )    

Comparison operations produce a Boolean (yes/no) value.    

The “if true then” and “if false then” operations set the running total to the operand if the current running total is true or false respectively.    

 « Addenda / Errata

A:
The Igrnore operation also now supports an operand which is undefined – i.e. not found – by silently ignoring the whole line.    

A:
The + and – operations work with text, by causing an “append” or “prepend” of the operand, promoting either running-total or operand to text if necessary first.    

A:
It is now possible to pre-pend formatted text ( -: )    

-> output produced by QuSheet, licenced to "Richard Develyn", 15 Oct 2009 130|1|24094