Undefined values: Difference between revisions

GP and PARI
({{task|Programming language concepts}})
(GP and PARI)
Line 488:
 
Explicitly checking the status of a variable with <code>IsFree</code> is discouraged because it can introduce race conditions.
 
=={{header|PARI/GP}}==
In GP, undefined variables test equal to the monomial in the variable with the name of that variable. So to test if <var>v</var> is undefined, do
<lang parigp>v == 'v</lang>
 
In PARI, you can do the same but the function <code>is_entry()</code> is more appropriate:
<lang C>is_entry("v") == NULL;</lang>
 
=={{header|Perl}}==