Subject token unknown in stored procedure
Author newgen_315
hi all,

could someone please, spot why I'm getting an error at line 16,

; token unknown


it's probably obvious but I just do not see it. everything I try
gives that error.

thanks
Daniel

SET TERM ^;
CREATE PROCEDURE COUNTVEHTIRES
( AX_LES INTEGER,
IDVEH INTEGER )
RETURNS ( ALLCOUNT INTEGER
, SPARECOUNT INTEGER)
AS
DECLARE VARIABLE AX INTEGER;
BEGIN
AX = 0;
ALLCOUNT = 0;
SPARECOUNT = 0;

/* WHILE ( AX <= :AX_LES ) DO */
/* BEGIN */


SELECT * FROM AXLES
WHERE AXPOS = :AX
AND IDVEH = :IDVEH
error ==> ORDER BY AXPOS;

BEGIN
IF (AXPOS = 0) THEN
BEGIN
IF (POSRI > 0) THEN
BEGIN
ALLCOUNT = ALLCOUNT + 1;
SPARECOUNT = SPARECOUNT + 1;
END
IF (POSLI > 0) THEN
BEGIN
ALLCOUNT = ALLCOUNT + 1;
SPARECOUNT = SPARECOUNT + 1;
END
END
ELSE
BEGIN
IF (POSRO > 0) THEN
ALLCOUNT = ALLCOUNT + 1;
IF (POSRI > 0) THEN
ALLCOUNT = ALLCOUNT + 1;
IF (POSLO > 0) THEN
ALLCOUNT = ALLCOUNT + 1;
IF (POSLI > 0) THEN
ALLCOUNT = ALLCOUNT + 1;
END
AX = AX + 1;
END
SUSPEND;
END ^
SET TERM ;^