Changeset 82716e in git for Singular/LIB/general.lib
- Timestamp:
- May 14, 1998, 8:45:19 PM (25 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 68e324ca946be87c2ab75edd4cc0fd161e1f6ead
- Parents:
- 30c91fe3835d6ff4504cc9ddeeb5866465754c2a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/general.lib
r30c91f r82716e 1 // $Id: general.lib,v 1. 7 1998-05-05 11:55:27 krueger Exp $1 // $Id: general.lib,v 1.8 1998-05-14 18:45:03 Singular Exp $ 2 2 //system("random",787422842); 3 3 //(GMG, last modified 22.06.96) 4 4 /////////////////////////////////////////////////////////////////////////////// 5 5 6 version="$Id: general.lib,v 1. 7 1998-05-05 11:55:27 krueger Exp $";6 version="$Id: general.lib,v 1.8 1998-05-14 18:45:03 Singular Exp $"; 7 7 info=" 8 8 LIBRARY: general.lib PROCEDURES OF GENERAL TYPE … … 21 21 sort(ideal/module); sort generators according to monomial ordering 22 22 sum(vector/id/..[,v]); add components of vector/ideal/...[with indices v] 23 which(command); 23 which(command); searches for command and returns absolute 24 24 path, if found 25 25 (parameters in square brackets [] are optional) … … 200 200 killall(\"not\", \"type_name\"); 201 201 COMPUTE: killall(); kills all user-defined variables but not loaded procedures 202 killall(\"type_name\"); kills all user-defined variables, of type \"type_name\" 202 killall(\"type_name\"); kills all user-defined variables, of type \"type_name\" 203 203 killall(\"not\", \"type_name\"); kills all user-defined 204 204 variables, except those of type \"type_name\" and except loaded procedures … … 216 216 } 217 217 } 218 else 218 else 219 219 { 220 220 if( size(#)==1 ) … … 224 224 for ( joni=size(L); joni>0; joni-- ) 225 225 { 226 if( L[joni]=="LIB" or typeof(`L[joni]`)=="proc" ) 226 if( L[joni]=="LIB" or typeof(`L[joni]`)=="proc" ) 227 227 { kill `L[joni]`; } 228 228 } 229 229 } 230 else 230 else 231 231 { 232 232 for ( ; joni>2; joni-- ) … … 649 649 string fn = "/tmp/which_" + string(system("pid")); 650 650 string pn; 651 if( typeof(command) != "string") 652 { 653 651 if( typeof(command) != "string") 652 { 653 return (pn); 654 654 } 655 655 i = system("sh", "which " + command + " > " + fn); … … 665 665 i = system("sh", "rm " + fn); 666 666 if (rs == 0) {return (pn);} 667 else 667 else 668 668 { 669 669 print (command + " not found ");
Note: See TracChangeset
for help on using the changeset viewer.