Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
wiki:mathematica [2015/05/15 11:37] martinrwiki:mathematica [2015/05/15 12:09] (aktuell) martinr
Zeile 4: Zeile 4:
 You may want to react on error messages created by a called function. For instance if you open a file and it cannot be opened. You may want to react on error messages created by a called function. For instance if you open a file and it cannot be opened.
  
-<code mma>+<code>
 Check[expr,failexpr] Check[expr,failexpr]
 </code> </code>
 evaluates expr, and returns the result, unless messages were generated, in which case it evaluates and returns failexpr. evaluates expr, and returns the result, unless messages were generated, in which case it evaluates and returns failexpr.
  
 +<code>
 Check[expr,failexpr,{s1::t1,s2::t2,…}] Check[expr,failexpr,{s1::t1,s2::t2,…}]
 +</code>
 checks only for the specified messages. checks only for the specified messages.
  
 +<code>
 Check[expr,failexpr,"name"] Check[expr,failexpr,"name"]
 +</code>
 checks only for messages in the named message group. checks only for messages in the named message group.
    
 Example: Example:
  
-Check[(a=<<"hallo"); , Print["could not open file"]; Exit[]; , {Get::noopen}] +<code> 
 +Check[(a=<<"hallo"); , Print["could not open file"]; Exit[42]; , {Get::noopen}] 
 +</code>
  

QR-Code
QR-Code Mathematica (erstellt für aktuelle Seite)