Escaping keywords for use as variables

Discuss the formula editor

Escaping keywords for use as variables

Postby cjm51213 » Fri Sep 12, 2014 6:15 pm

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
cjm51213
 
Posts: 15
Joined: Fri Jun 01, 2012 5:38 pm

Re: Escaping keywords for use as variables

Postby acknak » Fri Sep 12, 2014 6:39 pm

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
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

Postby cjm51213 » Fri Sep 12, 2014 7:30 pm

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
cjm51213
 
Posts: 15
Joined: Fri Jun 01, 2012 5:38 pm

Re: Escaping keywords for use as variables

Postby acknak » Fri Sep 12, 2014 7:44 pm

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
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3


Return to Math

Who is online

Users browsing this forum: No registered users and 2 guests