Is this wrong?

Been away from my programming for a while, and while looking through the code I ran across this line:

An underside called under#bed is part of the bed.

Is this legitimate code?

Also, though the program knows the player starts the game on the bed, commands that should only be followed after the player gets off the bed execute, such as 'look under bed." Do I need to establish the bed as a separate room?

Inform 7 doesn’t care about very many special characters; parentheses and periods are the main ones. I believe octothorpes in object identifiers shouldn’t be a problem.

And if you don’t want the player to be able to do something under certain conditions, the usual approach is to write an “instead” rule.

Ah, yes, "instead.’