--
--	Inmos Libraries
--	Copyright (C) 1988, 1989, 1990, 1991, 1993  Inmos Limited
--
--	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 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
--

--** @module convert

#OPTION "E V" -- no compiler libraries, no vector space
#COMMENT "Type conversion library V1.1 22/03/90"
#COMMENT "(c) Copyright INMOS Limited 1988"
PROC STRINGTOBOOL (BOOL Error, b, VAL []BYTE string)

  --{{{  history
  -- Beta-2 (27feb87)
  -- V1.0, 1-Jul-88
  -- Added V to the OPTIONs; V1.1, 22-Mar-90 SRH
  --}}}

  IF
    --{{{  TRUE
    (SIZE string) < 4
      Error := TRUE
    ((string [0] = 'T') AND (string [1] = 'R')) AND
        ((string [2] = 'U') AND (string [3] = 'E'))
      SEQ
        b := TRUE
        Error := ((SIZE string) <> 4)
    --}}}
    --{{{  FALSE
    (SIZE string) < 5
      Error := TRUE
    ((string [0] = 'F') AND (string [1] = 'A')) AND
        (((string [2] = 'L') AND (string [3] = 'S')) AND (string [4] = 'E'))
      SEQ
        b := FALSE
        Error := ((SIZE string) <> 5)
    --}}}
    TRUE
      Error := TRUE
:
