Should a property be quoted in object context or not

Let's say I have a property as a variable value:

set propName="Country"

Is there a method to determine, should I quote it to access the object, so would the correct code be:

write obj."Country"

or just simple

write obj.Country

is enough?

  • 0
  • 0
  • 141
  • 3
  • 1

Answers

Does

$zname(propName,6)

help you?

Docs.

It seems that this function hasn't been updated to cater for quoted property names.

Property "Long_Address" As %String;

.. is a valid property name, but $ZName("""Long_Address""",6) returns 0

About everything quoted is a valid property name:

Property "WHY( *?""*?";