4 * Revision 1.1 2001/04/04 05:43:37 wang
5 * First commit: compiles on Linux, Amiga, Windows, Windows CE, generic gcc
7 * Revision 1.2 1999/11/26 09:52:45 bnv
8 * Changed: To make use of the LastScannedNumber
10 * Revision 1.1 1998/07/02 17:16:35 bnv
18 /* ------------------- Lbool ------------------ */
20 Lbool( const PLstr num
)
24 switch (LTYPE(*num
)) {
26 if (_Lisnum(num
)==LSTRING_TY
)
27 Lerror(ERR_UNLOGICAL_VALUE
,0);
28 i
= (long)lLastScannedNumber
;
29 if ((double)i
!= lLastScannedNumber
)
30 Lerror(ERR_UNLOGICAL_VALUE
,0);
33 i
= (long)LREAL(*num
);
34 if ((double)i
!= LREAL(*num
))
35 Lerror(ERR_UNLOGICAL_VALUE
,0);
41 if (i
== 0 || i
== 1) return i
;
42 Lerror(ERR_UNLOGICAL_VALUE
,0);
43 return -1; /* Never gets here but keep compiler happy :-) */