Changeset 10221
- Timestamp:
- 2005-07-06T15:48:06+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/parse2.pm
r10216 r10221 1 1 #Last: Keeping doing the processArg for handing different type of arguments 2 2 3 #parse2(\@_,$argum nents,$self )3 #parse2(\@_,$arguments,$self ) 4 4 5 5 package parse2; … … 19 19 #----------------------------------------- 20 20 # Name: transformArg 21 # P erameters: 1.(Array pointer of plugin pre-defined argument list)21 # Parameters: 1.(Array pointer of plugin pre-defined argument list) 22 22 # Pre-condition: Call this function and pass a array pointer of argument list. 23 23 # Post-condition: This function will transform the array to a hash table … … 49 49 if($intInputArg < $aryRange[0]) 50 50 { 51 print STDERR " Parameter Parsing Error (Incorrect Range): when parse ar ugment parameter for \"-$strArgName\"\n";51 print STDERR " Parameter Parsing Error (Incorrect Range): when parse argument parameter for \"-$strArgName\"\n"; 52 52 return 0; 53 53 } … … 58 58 if($intInputArg > $aryRange[1]) 59 59 { 60 print STDERR " Parameter Parsing Error (Incorrect Range): when parse ar ugment parameter for \"-$strArgName\"\n";60 print STDERR " Parameter Parsing Error (Incorrect Range): when parse argument parameter for \"-$strArgName\"\n"; 61 61 return 0; 62 62 } … … 64 64 } 65 65 } 66 else{ die " System error: minimum range is not defined. Possi able misstyping in Argument list for $strArgName\n";}66 else{ die " System error: minimum range is not defined. Possible mistyping in Argument list for $strArgName\n";} 67 67 return 1; 68 68 } … … 75 75 if(length($intInputArg) != $intCharLength) 76 76 { 77 print STDERR " Parameter Parsing Error (Incorrect Char_Length): when parse ar ugment parameter for \"-$strArgName\"\n";77 print STDERR " Parameter Parsing Error (Incorrect Char_Length): when parse argument parameter for \"-$strArgName\"\n"; 78 78 return 0; 79 79 } … … 81 81 else 82 82 { 83 die " System error: incorrect char_leng h. Possiable misstyping in Argument list for $strArgName\n";83 die " System error: incorrect char_length. Possible mistyping in Argument list for $strArgName\n"; 84 84 } 85 85 return 1; … … 87 87 #----------------------------------------- 88 88 # Name: processArg 89 # P erameters: 1.(Hash pointer of one argument)89 # Parameters: 1.(Hash pointer of one argument) 90 90 # 2.(Array pointer of the user given argument) 91 91 # 3.(Hash pointer of user given arguments' values) … … 125 125 else 126 126 { 127 print STDERR " Error: occ our in parse2.pm::processArg()\n UnmatchArgument: -$strArgName with type $strArgType\n";127 print STDERR " Error: occur in parse2.pm::processArg()\n Unmatched Argument: -$strArgName with type $strArgType\n"; 128 128 return 0; 129 129 } … … 148 148 if($blnCheckInList ne "true") 149 149 { 150 print STDERR " Error: occ our in parse2.pm::processArg()\n Unknow Enum List Type: -$strArgName with parameter: $strInputArg\n";150 print STDERR " Error: occur in parse2.pm::processArg()\n Unknow Enum List Type: -$strArgName with parameter: $strInputArg\n"; 151 151 return 0; 152 152 } else { … … 157 157 else 158 158 { 159 print STDERR " Error: occ our in parse2.pm::processArg()\n Unknow Type: -$strArgName with type $strArgType\n";159 print STDERR " Error: occur in parse2.pm::processArg()\n Unknow Type: -$strArgName with type $strArgType\n"; 160 160 return 0; 161 161 } … … 173 173 else 174 174 { 175 print STDERR " Error: occ our in parse2.pm::processArg()\n Unknow Type: -$strArgName with type $strArgType\n";175 print STDERR " Error: occur in parse2.pm::processArg()\n Unknow Type: -$strArgName with type $strArgType\n"; 176 176 return 0; 177 177 } … … 183 183 #----------------------------------------- 184 184 # Name: parse 185 # P erameters: 1.(Array pointer of the user given argument)185 # Parameters: 1.(Array pointer of the user given argument) 186 186 # 2.(Array pointer of plugin pre-defined argument list) 187 187 # 3.(Self pointer, where we store all the argument value) … … 193 193 sub parse 194 194 { 195 # Get the user supplied ar ugments pointer "\@_"195 # Get the user supplied arguments pointer "\@_" 196 196 my $aryptUserArguList = shift; 197 197 … … 250 250 else 251 251 { 252 print STDERR " Error: occ our in parse2.pm::parse()\n Extra Arguments: $strOneArg\n";252 print STDERR " Error: occur in parse2.pm::parse()\n Extra Arguments: $strOneArg\n"; 253 253 return 0; 254 254 } … … 267 267 else 268 268 { 269 print STDERR " Error: occ our in parse2.pm::parse()\n Invaild Argument: $strOneArg\n";269 print STDERR " Error: occur in parse2.pm::parse()\n Invalid Argument: $strOneArg\n"; 270 270 return 0; 271 271 }
Note:
See TracChangeset
for help on using the changeset viewer.