Changeset 2307 in Sophya for trunk/SophyaPI/PIext
- Timestamp:
- Jan 8, 2003, 11:56:16 PM (23 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/basexecut.cc
r2305 r2307 55 55 { 56 56 Services2NObjMgr* srvo = mObjMgr->GetServiceObj(); 57 // ----> Sortie d'application58 if (kw == "exitpiapp") {59 mImgApp->Stop();60 return(0);61 }62 57 // >>>>> Chargement de modules 63 elseif (kw == "loadmodule") {58 if (kw == "loadmodule") { 64 59 if (tokens.size() < 2) { cout << "Usage: loadmodule fnameso modulename" << endl; return(0); } 65 60 mpiac->LoadModule(tokens[0], tokens[1]); … … 1076 1071 { 1077 1072 string kw, usage; 1078 kw = "exitpiapp";1079 usage = "To end the piapp session";1080 mpiac->RegisterCommand(kw, usage, this, "Commands");1081 1073 kw = "loadmodule"; 1082 1074 usage = "To load and initialize modules \n Usage: loadmodule fnameso modulename"; -
trunk/SophyaPI/PIext/piacmd.cc
r2306 r2307 12 12 #include "strutilxx.h" 13 13 // #include "dlftypes.h" 14 #ifdef SANS_EVOLPLANCK 15 #include "nbrand.h" 16 #else 17 #include "srandgen.h" 18 #endif 14 19 15 20 #include "pistdimgapp.h" … … 465 470 usage += " - sin(PI/6): pi 6 / sin \n"; 466 471 usage += " - 1*2*...*5: 1 2 3 4 5 product \n"; 467 usage += " - x = $x $y * \n";472 usage += " - x=x+y: x = $x $y * \n"; 468 473 usage += " >>> Stack operations : \n"; 469 474 usage += " print x<>y pop push (duplicate x) \n"; … … 478 483 usage += " >>> F(X,Y): (x,y) --> F(x,y) \n"; 479 484 usage += " pow atan2 \n"; 485 usage += " >>> F(): random number generators \n"; 486 usage += " rand (flat 0..1) norand (normal/gaussian) \n"; 480 487 usage += " >>> Stack sum/product/mean/sigma/sigma^2 \n"; 481 488 usage += " sum product mean sigma sigma2 sigmean (y->sigma x->mean) \n"; 489 RegisterHelp(kw, usage, grp); 490 491 kw = "autoiniranf"; 492 usage = "> Automatic random number generator initialisation\n"; 493 usage += " by Auto_Ini_Ranf(int lp) \n"; 494 usage += " Usage: autoiniranf"; 482 495 RegisterHelp(kw, usage, grp); 483 496 … … 490 503 usage += " > shell myfile.csh [arg1] [arg2] [...]\n"; 491 504 usage += " (where the first line of \"myfile.csh\" is \"#!/bin/csh\")\n"; 505 RegisterHelp(kw, usage, grp); 506 507 kw = "exitpiapp"; 508 usage = "To end the piapp session (Interpreter's command)"; 492 509 RegisterHelp(kw, usage, grp); 493 510 … … 1401 1418 rpnstack.top() = atan2(x,y); 1402 1419 } 1420 // generateur aleatoire 1421 else if (args[k] == "rand") { 1422 double rnd = drand01(); 1423 rpnstack.push(rnd); 1424 } 1425 else if (args[k] == "norand") { 1426 double rnd = GauRnd(0., 1.); 1427 rpnstack.push(rnd); 1428 } 1403 1429 // Fonction a N arguments - Somme, produit, etc ... 1404 1430 else if ((args[k] == "sum") || (args[k] == "mean") || (args[k] == "sigmean") || … … 1668 1694 ExecFile(tokens[0], tokens); 1669 1695 } 1696 else if (kw == "autoiniranf") { 1697 Auto_Ini_Ranf(1); 1698 return(0); 1699 } 1700 // ----> Sortie d'application 1701 else if (kw == "exitpiapp") { 1702 mImgApp->Stop(); 1703 return(0); 1704 } 1670 1705 else if (kw == "shell") { 1671 1706 if (tokens.size() < 1) { cout << "PIACmd::Interpret() Usage: shell cmdline" << endl; return(0); }
Note:
See TracChangeset
for help on using the changeset viewer.