Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://xmm.vilspa.esa.es/sas/7.1.0/doc/ssclib/node60.html
Дата изменения: Mon Jul 9 01:26:55 2007 Дата индексирования: Sat Dec 22 08:39:35 2007 Кодировка: Поисковые слова: п п п п п п п п п п п п п п р п р п р п р п р п р п р п р п р п р п р п р п |
subroutine splitSetTabName(setTabName, setName, tabName, noColonFound) character(*), intent(in) :: setTabName character(*), intent(out) :: setName, tabName logical(bool), intent(out), optional :: noColonFound end subroutine splitSetTabName
The parameter type `table' (see param) accepts a string consisting of a dataset name followed by a colon followed by a binary table name. If the user forgets to include the colon + table name, the resulting dal error is not very helpful as an indication of what has gone wrong. Personally I find it more useful to have as the default behaviour in this case that the first table in the dataset should be opened, with an accompanying warning. So I have written this routine splitSetTabName to act as a trap for the situation in which the user leaves off the colon+table name. The idea is that the string read from a `table'-type parameter is sent first to splitSetTabName, which searches the string for a colon; if it finds one, then it returns the before- and after-colon strings respectively in setName and tabName; if no colon is detected, splitSetTabName issues a warning, returns the entire string in setName, and also attempts to extract the name of the first table in the dataset and return this in tabName. An example of how to use splitSetTabName is as follows:
setTabName = stringParameter('mytable') ! this should be of param type `table' call splitSetTabName(setTabName, setName, tabName) set = dataSet(setName, READ) tab = table(set, tabName) ...XMM-Newton SOC/SSC -- 2007-07-08