|
FUNCTION singleton_member_of (spc : maths_space) : maths_value; LOCAL types : SET OF STRING := stripped_typeof ( spc ) ; END_LOCAL ; IF 'finite_space' IN types THEN IF SIZEOF ( spc \ finite_space . members ) = 1 THEN RETURN ( spc \ finite_space . members [ 1 ] ) ; END_IF ; RETURN ( ? ) ; END_IF ; IF 'finite_integer_interval' IN types THEN IF spc \ finite_integer_interval . size = 1 THEN RETURN ( spc \ finite_integer_interval . min ) ; END_IF ; RETURN ( ? ) ; END_IF ; RETURN ( ? ) ; END_FUNCTION; -- singleton_member_of |
|
public class FSingleton_member_of public static Value run(SdaiContext _context, Value spc) |