Changeset 5b1390 in git
- Timestamp:
- Dec 20, 2013, 7:00:03 PM (9 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- d1280f11e9d71dd9d45c276dfc5619bd557fba32
- Parents:
- 4e4e24bd5220c690dc16529b1fb431b5ef67482c
- git-author:
- Jakob Kröker <kroeker@math.uni-hannover.de>2013-12-20 19:00:03+01:00
- git-committer:
- Jakob Kroeker <kroeker@uni-math.gwdg.de>2014-01-28 11:47:55+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/ring.lib
r4e4e24b r5b1390 22 22 rootofUnity(n); the minimal polynomial for the n-th primitive root of unity 23 23 (parameters in square brackets [] are optional) 24 optionIsSet(opt) check if as a string given option is set or not. 24 25 "; 25 26 … … 27 28 LIB "general.lib"; 28 29 LIB "primdec.lib"; 30 31 /////////////////////////////////////////////////////////////////////////////// 32 proc optionIsSet(string optionName) 33 " 34 USAGE: @code{optionIsSet( optionName );} 35 PARAMETERS: @code{optionName}: a name(string) of an option of interest 36 RETURN: true, if the by @code{optionName} given option is active, false otherwise. 37 EXAMPLE: example optionIsSet; 38 " 39 { 40 def op = option(get); 41 //sanity check, if option is valid. will raise an error if not 42 option(optionName); option("no" + optionName); 43 option(set,op); 44 // first entry is currently a comment "//options:", which is not an option. 45 int pos = find(option(), optionName, 11 ); 46 return(pos>0); 47 } 48 example 49 { 50 // check if the option "warn" is set. 51 optionIsSet("warn"); 52 option("warn"); 53 // now the option is set 54 optionIsSet("warn"); 55 56 option("nowarn"); 57 // now the option is unset 58 optionIsSet("warn"); 59 } 60 61 62 static proc testOptionIsSet() 63 { 64 option("warn"); 65 ASSUME(0, optionIsSet("warn") ); 66 option("nowarn"); 67 ASSUME(0, 0 == optionIsSet("warn") ); 68 } 69 29 70 /////////////////////////////////////////////////////////////////////////////// 30 71
Note: See TracChangeset
for help on using the changeset viewer.