Skip to Content.
Sympa Menu

opal - Re: [Opal] Other attributes

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] Other attributes


Chronological Thread 
  • From: Andreas Adelmann <andreas.adelmann AT psi.ch>
  • To: Opal AT lists.psi.ch
  • Subject: Re: [Opal] Other attributes
  • Date: Mon, 22 Aug 2011 07:21:30 +0200
  • List-archive: <https://lists.web.psi.ch/pipermail/opal/>
  • List-id: The OPAL Discussion Forum <opal.lists.psi.ch>

Hi Chris yes this is a nice feature. You can define any number of additional attributes (restricted to real values).

The OPAL element then know this set of attributes and you can write code such as:

if (elem.has("myAttribute"))

process myAttribute ....
fi

In order to turn off the effect, just remove "myAttribute" from the input file.

Best Andreas 


On Aug 22, 2011, at 6:51 AM, Andreas Adelmann wrote:

Hi Andreas,

In the manual, " other: All elements can have arbitrary additional attributes which are not defined below."

This isn't great for error checking - can it be turned off with a switch somewhere?

Thanks,

Chris

Best Andreas
------
Dr. sc. math. Andreas (Andy) Adelmann
Staff Scientist
Paul Scherrer Institut WLGB/132 CH-5232 Villigen PSI
Phone Office: xx41 56 310 42 33 Fax: xx41 56 310 31 91
Phone Home: xx41 62 891 91 44
-------------------------------------------------------
Friday: ETH CAB H 83.1  +41 44 632 36 72
============================================
The more exotic, the more abstract the knowledge,
the more profound will be its consequences.
Leon Lederman
============================================







Archive powered by MHonArc 2.6.19.

Top of Page