Skip to content

PrintedText

Jim Nelson edited this page Sep 7, 2021 · 5 revisions

"I often quote myself. It adds spice to my conversation."
– George Bernard Shaw

The TADS library defines certain properties as expected to hold double-quoted strings. These are strings which print text when they are used in a line of code:

fnortiner: Thing
  name = 'Single-quoted string'
  desc = "Double-quoted string"

  fnort() {
    // does nothing
    item.name; 

    // prints "Double-quoted string" to output
    item.desc; 

    // prints "Single-quoted string" to output 
    // (because the 'name' single-quoted string property 
    // is expanded within a double-quoted string)
    "<<name>>";
  }
; 

As a rule of thumb, if the property ends with Desc (such as desc, feelDesc, or lookInDesc), it should be a double-quoted string.

Clone this wiki locally