How to fix the compile error?

When I run the following code, I found the error message: Mismatched number of parameters passed to procedure /home/jones/p85490r.ped.
(3234) , How to fix it? (I use HPUX11i progress 8.3E05.

code:
DEFINE INPUT PARAMETER p_TextFile AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER p_PDFFile AS CHARACTER NO-UNDO.

DEFINE VARIABLE v_line AS CHARACTER NO-UNDO.

{ pdf_inc.i}

RUN pdf_new ("Spdf",p_PDFFile).
RUN pdf_set_BottomMargin("Spdf",50).
RUN pdf_new_page("Spdf"). /* Instantiate a new page */

INPUT FROM VALUE(p_TextFile) NO-ECHO.
REPEAT:
IMPORT UNFORMATTED v_Line.

RUN pdf_text_color ("Spdf",0.0,.0,.0).
RUN pdf_text ("Spdf", v_Line).
RUN pdf_skip ("Spdf").

IF INDEX(v_Line,CHR(12)) > 0 THEN
RUN pdf_new_page("Spdf").
END.
INPUT CLOSE.
RUN pdf_close("Spdf").


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jurjen's picture

re: how to fix rhe compile error

It is actually not a compiler error.
You have tried to run the procedure directly from the procedure editor (because it has a temporary filename with .ped extension), but that is not possible because the procedure has parameters.


Thanks Jurjen! so How to fix

Thanks Jurjen!
so How to fix the error?


tamhas's picture

Use a wrapper

The code you show has input parameters. Therefore, it needs to be run from another program. If you have no other context, just write a little "wrapper" program to provide the parameters and make the call.