Escaping keywords for use as variables

Discuss the formula editor
Post Reply
cjm51213
Posts: 15
Joined: Fri Jun 01, 2012 5:38 pm

Escaping keywords for use as variables

Post by cjm51213 »

Hi Folks,

I periodically need to use a keyword, like "in", as a variable. How do I escape it? Putting it in quotes is not acceptable because it is no longer a variable, but is now text, which is formatted differently. So, is there a non-format bearing escape mechanism for keywords?

Thanks for the help,

Chris.
OpenOffice 3.4 on Windows Server 2008r2, Windows 7, Fedora 16
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Escaping keywords for use as variables

Post by acknak »

As far as I can see, there's no way to do it.I don't even see a good workaround.
 Edit: PS: 
Maybe something like
a italic "times" b
AOO4/LO5 • Linux • Fedora 23
cjm51213
Posts: 15
Joined: Fri Jun 01, 2012 5:38 pm

Re: Escaping keywords for use as variables

Post by cjm51213 »

Yes. The "ital" operator is a bad solution, but a solution. The obvious failing is the assumption that variables are italicized, which is a style choice. Wouldn't var{...} be a good way to handle this? Simply state, "This is a variable. Treat it as such."

Thanks for the help,

Chris.
OpenOffice 3.4 on Windows Server 2008r2, Windows 7, Fedora 16
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Escaping keywords for use as variables

Post by acknak »

cjm51213 wrote:... Wouldn't var{...} be a good way to handle this? ...
Makes sense to me but I couldn't get anything like that to work.

Unfortunately, there is no official, complete documentation of the Math language, so it's anyone's guess as to whether there may be some provision for this.

I did not find any bug report or request for enhancement for this, but you can submit one if you feel inclined: [Tutorial] Reporting bugs or suggestions
AOO4/LO5 • Linux • Fedora 23
Post Reply