ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Re bug report 18325 - Expressions dont work for restrictions

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Re bug report 18325 - Expressions dont work for restrictions

Postby saabie » Sat Dec 08, 2012 1:23 pm

As per Campbell's request in bug report 18325 - Expressions dont work for restrictions and text properties i am attaching a sample TAF file that shows the remaining problems.

Bug18325.taf
(13.38 KiB) Downloaded 85 times

The original error, with integer expressions not being evaluated in restrictions, has been fixed for property restrictions, but is still not working for variable restrictions.

Also, expressions involving text variables require quotes to be placed either around the variable name or around the string inside of the variable, otherwise ADRIFT tries to evaluate the string contents as an expression, causing an error.
I am not sure if this is intentional, but i would have expected the string to be quoted automatically when it was retrieved from the variable, as that is how expressions in most programming languages work.
If i place a variable name inside a quoted string in an expression then i would have expected the expression evaluator to treat it as text, not as a variable name.

P.S. When the variable name is quoted, all of the spaces are being removed from the strings as per Bug report 18326 - Spaces are removed from string assigned to variable
saabie
 
Posts: 885
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 10

Return to ADRIFT 5.0

Who is online

Users browsing this forum: Google [Bot] and 3 guests