User Tools

Site Tools


harlowe:variable_markup

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
harlowe:variable_markup [2017/10/09 20:39]
127.0.0.1 external edit
harlowe:variable_markup [2019/04/16 01:35] (current)
l
Line 1: Line 1:
 ====Variable markup==== ====Variable markup====
  
-In Harlowe, variables start with ''​%%$%%''​ (for normal variables) or ''​%%_%%''​ (for temp variables, which only exist inside a single passage, hook or lambda). You can print the contents of variables, or any further items within them, using the [[harlowe:​print|(print:​)]] and [[harlowe:​for|(for:​)]] +In Harlowe, variables start with ''​%%$%%''​ (for normal variables) or ''​%%_%%''​ (for temp variables, which only exist inside a single passage, hook or lambda).
-macros.+
  
-Or, if you only want to print a single variable, you can just enter the variable'​s name directly+Due to this syntax potentially conflicting with dollar values (such as $1.50) in your story text, 
 +variables cannot begin with a numeral. 
 + 
 +You can print the contents of variables, or any further items within them, using the [[harlowe:​print|(print:​)]] and [[harlowe:​for|(for:​)]] 
 +macros. ​Or, if you only want to print a single variable, you can just enter the variable'​s name directly
 in your passage'​s prose. in your passage'​s prose.
  
Line 11: Line 14:
 You put your _heldItem down and lift it for a snuggle. You put your _heldItem down and lift it for a snuggle.
 </​code>​ </​code>​
 +
 Furthermore,​ if the variable contains a changer command, such as that created by [[harlowe:​text-style|(text-style:​)]] and such, Furthermore,​ if the variable contains a changer command, such as that created by [[harlowe:​text-style|(text-style:​)]] and such,
 then the variable can be attached to a hook to apply the changer to the hook: then the variable can be attached to a hook to apply the changer to the hook:
harlowe/variable_markup.txt · Last modified: 2019/04/16 01:35 by l