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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: if-then-else in iocsh |
From: | Maren Purves <[email protected]> |
To: | [email protected] |
Cc: | Emmanuel Mayssat <[email protected]> |
Date: | Fri, 28 Jan 2005 09:39:46 -1000 |
Emmanuel Mayssat wrote:
I would like to check for the settings of an environment variable in iocsh. If the envrionment variable is not set, then I want to set it to a default value. Is there any way to do that ?
Yes, but how depends what variables you're trying to set, and whether this is for a particular IOC or all IOCs using a particular version of EPICS Base. The ioc shell is not intended to be a programming language, and it doesn't (and never will) provide conditional commands, so you can't just put something in the startup script that will work for any environment variable.
I had interpreted this yet different, and my first reaction was "you use a subroutine record" ...