I do not do anything exotic with my macros, but I would like to.
Specifically, I have two closely related databases called conb and simb in
which conb provides control functions and simb is a simulator for the
hardware that conb would normally control. Naturally, the structures of the
two databases are very closely related, so that every hardware interface in
conb, say conb:a:b:c, has a corresponding simulation, simb:a:b:c.
The current macros allow me to parse the heirarchical container,
$H = conb:a:b,
and the record name,
$I = c.
For my purpose I would like to parse out different levels of the record
name, perhaps with a syntax like $B(n) that would pick out everything before
the n'th occurance of the separator, and $A(n) that would pick out
everything after the n'th separator. I would get the desired record name in
the simulator from a record name in the controller with a macro of the form
"simb:$A(1)".
I can think of places in my databases that I would like to use the more
general syntax I have suggested, but for me this would be the most useful
application.
Just a thought that you might consider for the wish list.
Cheers,
Russell O. Redman
-----Original Message-----
From: Andrew Johnson
To: EPICS tech-talk
Sent: 8/15/02 12:57 PM
Subject: Macro names
A couple of questions about macro substitution in database files that I
need to check before I define some changes that could adversely affect
some EPICS sites:
1. Does anybody currently use macro names that have funny characters in
them? The EPICS macro library allows almost any character to be used in
a
name right now, but I'm thinking of significantly restricting this in
R3.15 (and within VDCT) to allow only alpha-numerics and underscore
[a-zA-Z0-9_] characters in the macro name. Macro values will obviously
still be able to contain any character. Any complaints, or requests for
additional characters to be added to that list?
2. Does anybody actually use the facility whereby macro names can
themselves be constructed using macros? - eg $(xx$(y)_$(zz)) I'm not
threatening to change this, just interested to hear if it's actually
useful.
I'm in the process of defining how hierarchical templates should work
for
VDCT, and I need to add some syntax to macro names so templates can be
usefully modular.
- Andrew
--
Edsger W. Dijkstra, 1930-2002: "The use of COBOL cripples the mind;
its teaching should, therefore, be regarded as a criminal offence."
- Navigate by Date:
- Prev:
EPICS BASE 3.14.0beta2 Application Developer's Guide Marty Kraimer
- Next:
Re: Macro names Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
<2002>
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Macro names Peregrine M. McGehee
- Next:
EPICS BASE 3.14.0beta2 Application Developer's Guide Marty Kraimer
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
<2002>
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|