User Tools

Site Tools


print

Differences

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

Link to this comparison view

print [2013/12/15 02:50]
l
print [2017/10/09 20:39]
Line 1: Line 1:
-=====<<​print>>​===== 
- 
- 
-====Shorthand form==== 
- 
-You may find yourself frequently using <<​print>>​ to simply print a variable, without alteration. <<​print>>​ has a convenient shorthand form for this single case: you simply omit the word "​print",​ leaving just the variable within the angle brackets. For instance, <<​print $beers>>​ can become simply <<​$beers>>​. 
- 
-This allows you to write Twine stories in a “template” style: 
-<​code>​ 
-Your superior officer approaches. "<<​$name>>,​ you've done a fine job. No, a 
-superlative job. <<​$species>>​ like you have no place on this cruel Earth, 
-that rewards only greed and selfishness."​ 
-</​code>​ 
- 
-**Note:** you can only perform this shorthand form using variables! You cannot, for instance, write <<​[[function|visited()]]>>​. 
  
print.txt · Last modified: 2017/10/09 20:39 (external edit)