Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IF field code and string ordering

4 views
Skip to first unread message

pascal...@gmail.com

unread,
Oct 8, 2007, 4:10:31 AM10/8/07
to
Hello,

I am trying to programmatically evaluate IF fields in word documents.
I need to mimick in my app Word's handling of IF fields.

There's a point that I can't understand : the following statement:

{ IF {DOCPROPERTY "something"} > 0 "true" "false"}

returns true if the document property "something" is set to
"dgskljsgdkl" or whatever non-numeric, alphabetic string.
However. it returns false if document property "something" is set to
"[gdslkjgsdsjdg", because of the trailing [.

Standard .net string comparison says "[gsdgdlkj" is greater that "0",
so I don't understand what rules Words uses to make the test.

In ascii table, [ comes after "0", so I was expecting a "false"
output.

Does anyone have an idea which set of comparison rules I should use to
reproduce Word behaviour on comparing strings, and strings to numbers?

Thanks,
Pascal.

0 new messages