Can I seriously not use comparatives/superlatives with enumerated values?

0 votes
54 views
asked Sep 7 in Authoring by infinull (1 point)

In many cases enumerated values can be treated like numbers (like with comparisons) and successor, predecessor relations. (though you use next ... instead of increment ..., but it's the same basically)

This does not work, but I feel like it should.

Military rank is a kind of value.
The military ranks are rank private, specialist, corporal, seargent, master seargent, seargent major.
A person has a military rank.

Definition: A person is noble if his military rank is master seargent or more.

The beaches of Normandy is a room.

McGilliguddy is a rank private man. He is here.
Sarge Stewart is a master seargent man. He is here.

when play begins:
    say "[the noblest man]"

This is what I'm using as a work-around, but it feels janky.

Military rank is a kind of value.
rank0 specifies a military rank.
private rank is always rank0.
specialist is always rank1.
corporal is always rank2.
seargent is always rank3.
master seargent is always rank4.
seargent major is always rank5.

A person has a military rank.

Definition: A person is noble if his military rank is rank4 or more.

The beaches of Normandy is a room.

McGilliguddy is a man. He is here. The military rank is private rank.
Sarge Stewart is a man. He is here. The military rank is master seargent.

when play begins:
    say "[the noblest man]"
commented Sep 24 by Dannii (329 points)
I guess the delayed answer is simply: no you can't. These types of things would be best suggested on the Inform 7 suggestion site (https://inform7.uservoice.com/) though.
This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...