Changeset 0e896b7 in tol
- Timestamp:
- Mar 1, 2010, 4:30:46 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- e945583
- Parents:
- b2a343a
- File:
-
- 1 edited
-
tol/btol/bgrammar/spfuninst.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/bgrammar/spfuninst.cpp
rb2a343a r0e896b7 507 507 else 508 508 { 509 if(args.Card() ==2)509 if(args.Card()>=2) 510 510 { 511 511 uTxt = args[1]; 512 512 uSet = args[2]; 513 if(uTxt && uSet && Set(uSet).Card()) 513 514 if(uTxt && uSet) 514 515 { 515 BText txt = uTxt->Dump(); 516 BSet& set = Set(uSet); 517 BText txt = uTxt->Dump(); 516 518 txt = txt.SubString(1,txt.Length()-2); 517 519 BStandardOperator* ope = (BStandardOperator*)gra->FindOperator(txt); 518 520 if(ope) 519 521 { 520 BSet& set = Set(uSet); 521 if(set.Card()>0) 522 if(set.Card()==0) 523 { 524 if(args.Card()==3) 525 { 526 result = args[3]; 527 } 528 else 529 { 530 Error(I2("Cannot evaluate Group over empty set without " 531 "a default value.", 532 "No sepuede evaluar Group sobre un conjunto vacío " 533 "sin valor por defecto.")); 534 } 535 } 536 else 522 537 { 523 538 BBool ok = BTRUE; … … 1959 1974 1960 1975 AddInstance("Group", 1961 I2("(Text function, Set s )",1962 "(Text función, Set s )"),1976 I2("(Text function, Set s [, Anything defaultForEmpty])", 1977 "(Text función, Set s [, Anything defaultForEmpty])"), 1963 1978 I2("Evaluates a function taking as arguments the elements of a set.\n\n" 1964 1979 "Example:\n"
Note: See TracChangeset
for help on using the changeset viewer.
