Jump to content
Excelsior Forums
oo

On the use of StrToCard Procedure

Recommended Posts

Hi,

In compiling some old code, I am getting errors of the form:

---------------

* [PARTS.MOD 33.22 E029]

* incompatible types:

    "OPEN ARRAY OF CHAR"

    "CHAR"

gl:=Str.StrToCard(dot$[g],10,bool);

-----------------------

The corresponding line is

gl:=Str.StrToCard(dot[g],10,bool);

Here, g1 and g are CARDINAL, dot is defined as dotType where dotType = ARRAY [0..99] OF CHAR; Finally bool is BOOLEAN.

Thanks to any one who has ideas?

O.O.

Share this post


Link to post
Share on other sites

That's right, there are different, incompatible types of the formal and the actual parameters. TopSpeed M2 compiler allows to put CHAR where ARRAY [] OF CHAR is expected; XDS M2 compiler does not. To make that possible you need to install TopSpeed Compatibility Pack, then turn the option TOPSPEED on:

xc =c test.mod +topspeed +m2addtypes

There is the option m2addtypes to include the additional numeric types (Str.StrToCard returns LONGCARD).

Hope it will help.

Share this post


Link to post
Share on other sites

Thanks for your quick reply. The +m2addtypes command line options fixed my problem immediately. (Though I have a lot of problems before I can get this to compile.)

Thanks again.

O.O.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×