diff options
author | nutricato | 2008-06-04 08:58:15 +0000 |
---|---|---|
committer | nutricato | 2008-06-04 08:58:15 +0000 |
commit | 9d4cbed90bf28487c52de84e7040ee78e60b4b5d (patch) | |
tree | b2aefdb73ca2ae200c92e1847030db5a7f650adb /src/Scilab2C/GeneralFunctions/ReadStringCard.sci | |
parent | 56805b2de8725a4169ba40d1acbda997ea2528aa (diff) | |
download | scilab2c-9d4cbed90bf28487c52de84e7040ee78e60b4b5d.tar.gz scilab2c-9d4cbed90bf28487c52de84e7040ee78e60b4b5d.tar.bz2 scilab2c-9d4cbed90bf28487c52de84e7040ee78e60b4b5d.zip |
Diffstat (limited to 'src/Scilab2C/GeneralFunctions/ReadStringCard.sci')
-rw-r--r-- | src/Scilab2C/GeneralFunctions/ReadStringCard.sci | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/Scilab2C/GeneralFunctions/ReadStringCard.sci b/src/Scilab2C/GeneralFunctions/ReadStringCard.sci deleted file mode 100644 index a6abfcb7..00000000 --- a/src/Scilab2C/GeneralFunctions/ReadStringCard.sci +++ /dev/null @@ -1,51 +0,0 @@ -function cardvalue = ReadStringCard(filename,cardname,commentdelim,enableerror);
-// function cardvalue = ReadStringCard(filename,cardname,commentdelim,enableerror);
-// -----------------------------------------------------------------
-// Reads the string associated to the card cardname placed
-// in filename.
-// The value of cardname is assumed to be a string.
-// If the card is not found an error will occur.
-//
-// Input data:
-// filename: full path + name of the file where the card
-// is being searched.
-// cardname: string with the name of the card.
-// commentdelim: specifies a character for an eventual comment
-// (to be discarded) after the card value.
-// enableerror: 'y' enable error message.
-// 'n' enable warning message.
-//
-// Output data:
-// cardvalue: string associated to the card. Blanks characters
-// are discarded.
-//
-// Status:
-// 06-Feb-2004 -- Nutricato Raffaele: Author.
-// 06-Feb-2004 -- Nutricato Raffaele: TEST OK.
-// 25-Jun-2004 -- Nutricato Raffaele: Added Comment delimiter
-// and enableerror as input parameter.
-// 13-Apr-2007 -- Intelligente Fabio: Rewritten from Matlab to Scilab.
-// -----------------------------------------------------------------
-
-if argn(2) == 2 then
- commentdelim = ' ';
- enableerror = 'y';
-
-elseif argn(2) == 3 then
- enableerror = 'y';
-end
-
-[flag_found,requested_line,dummy2] = ...
- KeyString2FileStringPos(filename,cardname,'cut');
-cardvalue = stripblanks(strtok(requested_line,commentdelim));
-clear requested_line dummy2
-
-if (flag_found == 0) then
- if (enableerror == 'y') then
- SCI2Cerror([cardname,' not found']);
- else
- warning([cardname,' not found']);
- end
-end
-
-endfunction
|