Is it possible to put pascal code in a c project?

Is it possible to put pascal code in a c project?

Post by MW R » Wed, 22 Nov 1995 04:00:00




Quote:>I have CW7 and I have several cd's full of pascal source code.  I want to
>take the pascal code and put it directly into my c project.

You can add a source file directly in a C project but you can not add the
code into the C Source file.  You can also create a library of your Pascal
codes.  

Ron

   METROWERKS               Ron Liechty

 
 
 

Is it possible to put pascal code in a c project?

Post by Michael Ham » Fri, 24 Nov 1995 04:00:00




>>I have CW7 and I have several cd's full of pascal source code.  I want to
>>take the pascal code and put it directly into my c project.

>You can add a source file directly in a C project but you can not add the
>code into the C Source file.  You can also create a library of your Pascal
>codes.  

One oddity worth noting about this is that if you want to call Pascal
routines from C++ and you are using the PPC C++ compiler, you need to

 (a) Put the declarations in a .h file

 (b) Surround them with
   #pragma cplusplus off

   #pragma cplusplus reset

This prevents the PPC compiler from applying name mangling, which causes
link errors. Strangely enough the 68K compiler has enough sense not to do
this....

--
To get random signatures put text files into a folder called 3Random Signatures2 into your Preferences folder.

 
 
 

1. PP: Putting up a *very* simple listbox using LListBox...problems I am having.

i'm trying to put up a simple, one-column list box using the LListBox
class. i really don't wanna use the new LTableView hierarchy yet because
it's not very intensive and this functionality is a large overshot right
now. anyway, the problem is that i have derived a class from LListBox to
listen to a button, when it is pushed i wanna add a row to the list box.
there doesn't appear to be a method within LListBox for doing this
(getting the last row in the list, adding a new row at that location,
and setting that row to some given text). the reference CD doesn't have
much info on this. so i tried using the normal Toolbox List Manager
routines by getting the handle to the list using the LListBox method
GetMacListH() and using it in things like ::LAddRow() and ::LSetCell().
Everything appears to work when it hears that the button is clicked it
adds a row, but the text i set the row to does not appear. i know it is
adding rows because the scroll bar becomes active after a certain number
of clicks. any idea why it is not working for me?

tia.

--
Phillip Kavan - Drake University, Senior, Computer Science
1126 25th Street/Apt. #20 Des Moines, IA  50311

Web: http://kope.drake.edu/squirrelsoft/
--
I need a job starting May 13.
My experience includes C/C++/Java, HTML/CGI/web site development, MacOS
programming with Metrowerks(tm) compilers, OpenGL, some UNIX sysadmin
tasks, IRIX 5.2 and X-Windows.
Feel free to contact me at (515) 255-3170.
--

2. Connects to USR but can not use...

3. How to include Pascal code in C project

4. OE unsafe attachments.

5. Useing c within a pascal project in code warrior

6. MSN Messenger Constantly logging itself out....... help..

7. Pascal folks - put up or shut up

8. Which Line to REM out?

9. plug-ins in pascal ?

10. My bad template code puts CW in infinite loop..

11. Putting a code fragment into a resource

12. CodeWarrior is putting my CODE resource in middle of heap!

13. Can PowerPlant be put in a code resource?