verifiche (* SameQ[esp1,esp2] Vero se identiche o Falso *) SameQ[a,a] (* True *) SameQ[a,b] (* False *) a===a (* True *) a===b (* False *) (* StringMatchQ["stringa1","stringa2"] vero se uguali o falso *) StringMatchQ["asia","asia"] (* True *) StringMatchQ["asia","africa"] (* False *) (* StringQ[espressione] Vero se stringa o falso*) StringQ["asia"] (* True *) StringQ[asia] (* False *) (* SyntaxQ[stringa] Vero se stringa o falso *) SyntaxQ["stringa esatta"] (* True *) SyntaxQ["string"] returns True if the string corresponds to syntactically correct input for a single Mathematica expression, and returns False otherwise. (* TrueQ[espressione] Vero se vera o falso *) TrueQ[5x+7] (* False *) x=6;TrueQ[5x+7==37] (* True *) (* UnsameQ[esp1,esp2] Vero se diverse o falso se uguali *) UnsameQ[5,7] (* True *) 5!=7 (* True *) UnsameQ[5,5] (* False *) 5!=5 (* False *) (* UpperCaseQ[stringa] Vero se maiuscole o falso *) UpperCaseQ["ASIA"] (* True *) UpperCaseQ["Asia"] (* False *) ?VectorQ (* VectorQ[espressione] Vero se vettore o falso *) VectorQ[{a,b,c}] (* True *) VectorQ[a] (* False *) VectorQ[expr] gives True if expr is a list, none of whose elements are themselves lists, and gives False otherwise. VectorQ[expr, test] gives True only if test yields True when applied to each of the elements in expr. True ;[o] True False ;[o] False
torna a inizio