Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000488Core InformUnderstandingpublic2010-12-30 07:412014-05-07 07:33
Reporterektemple 
Assigned Tograham 
PrioritynormalSeveritymildReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSMac OS XOS Version10.6
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000488: Author-defined types of value parsed improperly with grammar defined in conditional "understand" lines
DescriptionParsing of certain author-defined types of value fails when using command grammar that has been defined using a conditional understand line.
Minimal Source Text To Reproduce
Test is a room.

A real number is a kind of value. -999999.9999 specifies a real number with parts whole and fractional.


The element-selection set is a list of numbers variable. The element-selection set is {1}.

Scaling elements is an action applying to one real number. Understand "scale at [real number]" 
or  "scale element/elements at [real number]" or "scale to [real number]" or "scale 
element/elements to [real number]" as scaling elements.

Understand "scale [real number]" as scaling elements when the number of entries of the element-selection 
set > 0.

Carry out scaling elements:
	say "Scaled to [real number understood]!"

Test me with "scale element at 0.8000 / scale element at 1.2500 / scale 0.8000 / scale 1.2500 / 
scale -1.0000 / scale -0.9000 / scale 0.9999 / scale 1.0000"
Additional InformationThis bug was introduced in 6Exx, I believe, or possibly 6F95. Here are the test script outputs for 6G60 and 5Z71:

----6G60----
>[1] scale element at 0.8000
Scaled to 0.8000!

>[2] scale element at 1.2500
Scaled to 1.2500!

>[3] scale 0.8000
Scaled to 0.8000!

>[4] scale 1.2500
I don't think much is to be achieved by that.

That's not a verb I recognise.

>[5] scale -1.0000
You can't see any such thing.

>[6] scale -0.9000
You can't see any such thing.

>[7] scale 0.9999
Scaled to 0.9999!

>[8] scale 1.0000
I don't think much is to be achieved by that.

That's not a verb I recognise.


----5Z71----
>[1] scale element at 0.8000
Scaled to 0.8000!

>[2] scale element at 1.2500
Scaled to 1.2500!

>[3] scale 0.8000
Scaled to 0.8000!

>[4] scale 1.2500
Scaled to 1.2500!

>[5] scale -1.0000
You can't see any such thing.

>[6] scale -0.9000
You can't see any such thing.

>[7] scale 0.9999
Scaled to 0.9999!

>[8] scale 1.0000
Scaled to 1.0000!

-----
Note that "negative" values always fail to be parsed correctly, going back at least to 5Z71. I'll file a separate report for that.
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
(0000935)
Poster (reporter)
2010-12-30 19:18

I see the same results under Mac OS 10.5, 6G60.
(0000938)
EmacsUser (manager)
2010-12-31 06:48

Looks like an interaction with the built-in verb scale, meaning to climb.
(0000939)
ektemple (reporter)
2010-12-31 06:58

Ah, interesting; that gives me an easy workaround--thanks! Should also help narrow down the bug possibilities.
(0000940)
EmacsUser (manager)
2010-12-31 07:07

Confirmed. The input

> scale 1.2500

is parsed with the full stop as a command divider:

> scale 1
> 2500
(0000941)
EmacsUser (manager)
2010-12-31 07:12

Ah, which is because ``1'' is taken to be the number of things the player wants to climb, whereas ``0'' isn't understood that way.
(0002514)
graham (administrator)
2014-02-16 08:14

This appears to be fixed as a result of changes made when real numbers were added to the build-in-progress; I can't duplicate even when changing the syntax.

- Issue History
Date Modified Username Field Change
2010-12-30 07:41 ektemple New Issue
2010-12-30 19:18 Poster Note Added: 0000935
2010-12-31 02:43 jmcgrew Status new => acknowledged
2010-12-31 06:48 EmacsUser Note Added: 0000938
2010-12-31 06:58 ektemple Note Added: 0000939
2010-12-31 07:07 EmacsUser Note Added: 0000940
2010-12-31 07:07 EmacsUser Status acknowledged => confirmed
2010-12-31 07:12 EmacsUser Note Added: 0000941
2010-12-31 07:15 EmacsUser Reproducibility have not tried => always
2014-02-16 08:14 graham Note Added: 0002514
2014-02-16 08:14 graham Status confirmed => resolved
2014-02-16 08:14 graham Resolution open => fixed
2014-02-16 08:14 graham Assigned To => graham
2014-05-07 07:32 jmcgrew Fixed in Version => 6L02
2014-05-07 07:33 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker