Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000451Core InformSource text and punctuationpublic2010-12-01 20:452014-05-07 07:35
Assigned Tograham 
Platformx86OSMac OS XOS Version10.5
Product Version6F95 
Target VersionFixed in Version6L02 
Summary0000451: Blank line in rule causes unhelpful errors
DescriptionIf the blank line following the first "Say" in the Instead clause is present, the errors below occur. If the blank line is absent, the code compiles. This might be a Core Inform problem, but it seemed most likely that the IDE was mishandling the code before it sent it to the compiler.

The errors:
Problem. I am reading the sentence 'If invisobox is open begin' as a declaration of the initial state of the world, so I'm expecting that it will be definite. The only way I can construe it that way is by thinking that 'If invisobox' and 'open begin' are two different things, but that doesn't make sense, and the 'if' makes me think that perhaps you did not mean this as a definite statement after all. Although 'if...' is often used in rules and definitions of what to do in given circumstances, it shouldn't be used in a direct assertion.

Problem. You wrote 'If player on towering box, say "It is open, one flap sticking up."' : but I can't find a verb that I know how to deal with. This looks like an 'if' phrase which has slipped its moorings, so I am ignoring it. ('If' phrases, like all other such instructions, belong inside definitions of rules or phrases - not as sentences which have no context. Maybe a full stop was accidentally used instead of semicolon, so that you inadvertently ended the last rule early?)
 See the manual: 11.6 > If

Problem. You wrote 'end if' : but I can't find a verb here that I know how to deal with, so I am ignoring this sentence altogether.
 See the manual: 2.17 > Review of Chapter 2: The Source Text
Minimal Source Text To Reproduce
Sanitarium is a room.
A towering box is in Sanitarium. 
Invisobox is a container in Sanitarium. The invisobox is scenery, openable, and closed.
Instead of examining the towering box:
[Tab]Say "The tallest box in the whole room.";
[Tab]If invisobox is open
[Tab][Tab]If player on towering box, say "It is open, one flap sticking up.";
[Tab][Tab]end if.
TagsNo tags attached.
Effect(cosmetic) Error message is badly worded
Attached Files

- Relationships
related to 0000474closedgraham Unhelpful error message when using if statement incorrectly 
related to 0000475closedgraham Unhelpful error message when using verbs incorrectly. 

-  Notes
jmcgrew (administrator)
2010-12-01 22:22
edited on: 2010-12-01 22:24

This is a Core Inform issue: I7 doesn't allow blank lines inside a rule. A paragraph break is treated as a period (as mentioned at WI 2.3), which is why the next line is parsed as a top-level declaration as mentioned in the first error message. Since not everyone is careful to end their rules with a period, changing this behavior would break existing code.

If you have a suggestion for improving the error, I can move this and keep it open; otherwise I can close it.

(BTW, tabs work in the "minimal source text to reproduce" section, just not in the others.)

Poster (reporter)
2010-12-02 15:12

That behavior coddles the user in a way that makes code less readable and less understandable. It's not very writing-centric nor programming-centric. That aside, here is a suggestion for the error message:

Problem: The statement 'Say "The tallest box in the whole room."' is followed by a blank line. A blank line within a rule acts like a period, and as a result, I can't understand the lines that immediately follow it. (Were they part of the rule?)
graham (administrator)
2011-10-16 06:41

I see no case for any great change; the problems include a correct diagnosis of what's wrong. I've changed "a full stop was accidentally" to "a full stop or a skipped line was accidentally", which might be a marginal improvement.

- Issue History
Date Modified Username Field Change
2010-12-01 20:45 Poster New Issue
2010-12-01 22:22 jmcgrew Note Added: 0000877
2010-12-01 22:22 jmcgrew Assigned To => jmcgrew
2010-12-01 22:22 jmcgrew Status new => feedback
2010-12-01 22:24 jmcgrew Note Edited: 0000877 View Revisions
2010-12-02 15:12 Poster Note Added: 0000878
2010-12-02 15:12 Poster Status feedback => assigned
2010-12-02 15:23 jmcgrew Project Mac OS X Inform application => Core Inform
2010-12-02 15:24 jmcgrew Effect => (cosmetic) Error message is badly worded
2010-12-02 15:24 jmcgrew Severity mild => cosmetic
2010-12-02 15:24 jmcgrew Status assigned => confirmed
2010-12-02 15:24 jmcgrew Category Editing => Source text and punctuation
2010-12-02 20:48 jmcgrew Summary Blank line in instead causes spurious errors => Blank line in rule causes unhelpful errors
2010-12-07 00:34 jmcgrew Assigned To jmcgrew =>
2010-12-19 00:02 jmcgrew Relationship added related to 0000474
2010-12-19 00:05 jmcgrew Relationship added related to 0000475
2011-10-16 06:41 graham Note Added: 0001394
2011-10-16 06:41 graham Status confirmed => resolved
2011-10-16 06:41 graham Resolution open => fixed
2011-10-16 06:41 graham Assigned To => graham
2014-05-07 07:34 jmcgrew Fixed in Version => 6L02
2014-05-07 07:35 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker