XCLE



Intg Object structure and methods

Instructions manual


XCLE: eXtensible Concatenative Language Engine
Copyright (C) 2000-2006 Yann LANDRIN-SCHWEITZER a.k.a. Varkhan


This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Author: Yann LANDRIN-SCHWEITZER
Contact: varkhan@varkhan.net
Homepage: http://www.varkhan.net/


XCLE_Intg object type


Function XCLE_IntgAlloc

XCLE_Intg XCLE_IntgAlloc(void) ;
Allocates a new Intg object, with value zero.

Returns:
NULL: if no memory was available
else a new Intg object with value zero.


Errors:
ENOMEM: if no memory was available

Note:
The Intg object type is a double capacity (64 bits) integer.




Function XCLE_IntgCopy

XCLE_Intg XCLE_IntgCopy(XCLE_Intg in) ;
Copies the given Intg.

Args:
in: the object to copy


Returns:
NULL: if no memory was available
else a new Intg whose value is the same as 'in'.


Errors:
EINVAL: if a NULL Void was passed as argument
ENOMEM: if no memory was available

Note:
XCLE_IntgCopy and XCLE_IntgClone do exactly the same thing.




Function XCLE_IntgClone

XCLE_Intg XCLE_IntgClone(XCLE_Intg in) ;
Clones the given Intg.

Args:
in: the object to clone


Returns:
NULL: if no memory was available
else a new Intg whose value is the same as 'in'.


Errors:
EINVAL: if a NULL Void was passed as argument
ENOMEM: if no memory was available

Note:
XCLE_IntgCopy and XCLE_IntgClone do exactly the same thing.




Function XCLE_IntgFree

void XCLE_IntgFree(XCLE_Intg in) ;
Frees an Intg object.

Args:
in: Intg object to free




Function XCLE_IntgNew

XCLE_Intg XCLE_IntgNew(long nb) ;
Creates an Intg object from an integer value.

Args:
nb: value to give to the new object


Returns:
NULL: if no memory was available
else a new Intg whose value is 'nb'.


Errors:
ENOMEM: if no memory was available



Function XCLE_IntgEqual

unsigned char XCLE_IntgEqual(XCLE_Intg in, XCLE_Intg inw) ;
Compares two Intg.

Args:
in: Intg to compare
inw: reference Intg


Returns:
-1: if a NULL Intg was passed as argument
0: if the two Intg have distinct values
_ +1 " if the two Intg have the same value


Errors:
EINVAL: if a NULL Intg was passed as argument



Function XCLE_IntgValue

long XCLE_IntgValue(XCLE_Intg in) ;
Retrives the value of an Intg object.

Args:
in: Intg to query


Returns:
0: if a NULL Intg was passed as argument
else the integer value if the Intg object.


Errors:
EINVAL: if a NULL Intg was passed as argument




Generated by textdoc2html - 2006-02-22