Board index » delphi » Help, Help !!!, I'm stuck on a PASCAL program - cw3a.pas (0/1)

Help, Help !!!, I'm stuck on a PASCAL program - cw3a.pas (0/1)

Dear All,

Attached is my program designed on TP6.0. I was stuck on CALREALBIN
procedure.

Everytime, I start debug or compile the compiler displayed following
message :

"Error 113:Error in statement."

Then the cursor jump to the

PROCEDURE CALREALBIN (r_inputReal   :REAL;
                     i_Bit          :INTEGER;
                     b_OFFlag       :BOOLEAN;
                     VAR s_outstring:bit_string);

I'll use all the method I know to determine what is the cause of this
statement, but have no clue.

Any help is appreciated.

Thanks.

James Lo
Hong Kong
e-Mail  : loja...@netvigator.com  (Personal)
          U95...@cis.hkuspace.org (School)
          loja...@acm.org         (ACM)
HomePage: http://home.netvigator.com/~lojames/index.htm

 

Re:Help, Help !!!, I'm stuck on a PASCAL program - cw3a.pas (0/1)


Quote
Ching Tian wrote:

> Dear All,

> Attached is my program designed on TP6.0. I was stuck on CALREALBIN
> procedure.

> Everytime, I start debug or compile the compiler displayed following
> message :

> "Error 113:Error in statement."

> Then the cursor jump to the

> PROCEDURE CALREALBIN (r_inputReal   :REAL;
>                      i_Bit          :INTEGER;
>                      b_OFFlag       :BOOLEAN;
>                      VAR s_outstring:bit_string);

> I'll use all the method I know to determine what is the cause of this
> statement, but have no clue.

> Any help is appreciated.

> Thanks.

First: sending binaries to this group is not really appreciated
(for various reasons, one being that source code usually takes up
_more_ space when uuencoded, it being text to begin with).

Now to your question: even without the source, I would say that
you have a BEGIN keyword in your previous procedure/function definition
that is not balanced by an END keyword. In that case, the compiler
sees a procedure definition within a BEGIN/END block, which is not
allowed.

So, check your begin/end pairs (indentation helps here a lot).

Good luck,

Remco
--

Remco Vietor                            Department of Chemistry
re...@chem.gla.ac.uk                       J. Black Building
                                        University of Glasgow
                                        Glasgow G12 8QQ
                                        U.K.

Re:Help, Help !!!, I'm stuck on a PASCAL program - cw3a.pas (0/1)


Quote
Ching Tian wrote:
> Dear All,

> Attached is my program designed on TP6.0. I was stuck on CALREALBIN
> procedure.

> Everytime, I start debug or compile the compiler displayed following
> message :

> "Error 113:Error in statement."

> Then the cursor jump to the

> PROCEDURE CALREALBIN (r_inputReal   :REAL;
>                      i_Bit          :INTEGER;
>                      b_OFFlag       :BOOLEAN;
>                      VAR s_outstring:bit_string);

How do you define bit_string ??

Re:Help, Help !!!, I'm stuck on a PASCAL program - cw3a.pas (0/1)


Quote
Ching Tian wrote in message <3482bb68.1010...@news.netvigator.com>...
>Dear All,

>Attached is my program designed on TP6.0. I was stuck on CALREALBIN
>procedure.

>Everytime, I start debug or compile the compiler displayed following
>message :

>"Error 113:Error in statement."

>Then the cursor jump to the

>PROCEDURE CALREALBIN (r_inputReal   :REAL;
>                     i_Bit          :INTEGER;
>                     b_OFFlag       :BOOLEAN;
>                     VAR s_outstring:bit_string);

>I'll use all the method I know to determine what is the cause of this
>statement, but have no clue.

>Any help is appreciated.

>Thanks.

I checked that source of yours, and the error is in the
routine above the CALREALBIN.
On various places you write something like this:

       IF (i_Bit = i_NoOfBit) AND (c_Sign = '+') THEN
          BEGIN
             CASE i_exponent OF
                3 : s_ExcessString := '111';
                2 : s_ExcessString := '110';
                1 : s_ExcessString := '101';
                0 : s_ExcessString := '100';
          END;

So you forgot to end the case statement with an END;
As far as i saw, you forgot to use an END in all
case statements, so when encountering the CALREALBIN
procedure the compiler reports that this is invalid since
the previous procedure hasn't finished yet...

Chris

Other Threads