PDA

View Full Version : Converting TP to FP - my units have unexpected EOF!


Jeff
07-19-2004, 10:01 AM
Steven, others...

I have one unit that uses only crt and graph. It compiles fine.

Every other unit uses the first unit... and they all end unexpectedly. Must be I need to do something but They all end with "END." Do I need to do anything else?

Thanks!

~See you at the SCIWire-used-to-be-paralyzed Reunion http://www.stopstart.fsnet.co.uk/smilie/wavey.gif ~

Steven Edwards
07-19-2004, 01:44 PM
I had this problem when I was compiling an old program a couple of years ago. I think that there is a problem with including a custom unit multiple times, but I'll have to do some tests to verify this assumption.

I was able to rewrite everything so that there were no multiple "inheritances" and it worked, but that may not be possible with your program.

Could you find the Error in this list (http://www.freepascal.org/docs-html/user/userse56.html#x82-169000C.1)?

-Steven
...525,600 minutes, 525,000 moments so dear. 525,600 minutes - how do you measure, measure a year? ... how about love? measure in love. seasons of love.

Jeff
07-19-2004, 02:16 PM
Here it is:

Fatal: Unexpected end of file this typically happens in one of the following cases :

* The source file ends before the final end. statement. This happens mostly when the begin and end statements aren't balanced;
* An include file ends in the middle of a statement.
* A comment wasn't closed.



I checked these things. Syntax highlighting lines it all up. Guess I'll have to look harder! Thanks for the list!

~See you at the SCIWire-used-to-be-paralyzed Reunion http://www.stopstart.fsnet.co.uk/smilie/wavey.gif ~

Jeff
07-19-2004, 02:24 PM
Cowabunga. The syntax highlighter in the IDE interprets nested comments totally copacetically. But the compiler says, "no can do." Strange.

~See you at the SCIWire-used-to-be-paralyzed Reunion http://www.stopstart.fsnet.co.uk/smilie/wavey.gif ~

Jeff
07-19-2004, 03:23 PM
I'm down to the last few compile errors. The original program sampled data on a serial port. The ports unit isn't implementted for Windows... and I need to read USB, anyway. I'm googling for a USB 2.0 package for freepascal. Not looking good so far.

~See you at the SCIWire-used-to-be-paralyzed Reunion http://www.stopstart.fsnet.co.uk/smilie/wavey.gif ~

Steven Edwards
07-19-2004, 07:26 PM
If you feel comfortable, send me the code via email and I'll see if I can help with a workaround solution.

-Steven
...if i knew all about this one thing, wouldn't that be something

Jeff
07-19-2004, 09:37 PM
Thanks for the offer Steven. I've actually seen USB drivers for various implementations of C. And I've seen freepascal wrappers for various C language libraries. So... I guess I need to pick a good USB package in C and find or write wrapper functions for freepascal. Sounds worse than it is. I don't really need a whole async i/o library I don't think.

I'm actually shocked at how easily I can compile what I have. Just don't need references to hercules or monochrome monitors anymore. http://sci.rutgers.edu/forum/images/smilies/smile.gif Cracks me up. Some of these monitors were 320x200.

~See you at the SCIWire-used-to-be-paralyzed Reunion http://www.stopstart.fsnet.co.uk/smilie/wavey.gif ~

Jeff
07-20-2004, 12:01 PM
Steven - Just to let you know I decided the low-hanging fruit was to go with Linux which does allow access to ports. This way I can read the existing hardware and will have minimal changes.

Windows requires Ring 0 in order to access ports... which means writing a device driver and sending info back and forth to the user program [Ring 3]. Not too fun. So first off is a Linux version running on any hardware they want. It will be a big improvement.

Later, we'll figure out how to read the machine with a USB device and keep it platform independent. Since FP supports Windows, Linux, OSX, etc it would be nice to support all those ourselves.

~See you at the SCIWire-used-to-be-paralyzed Reunion http://www.stopstart.fsnet.co.uk/smilie/wavey.gif ~

Steven Edwards
07-20-2004, 01:34 PM
320x200... $A000 much. http://sci.rutgers.edu/forum/images/smilies/tongue.gif

I think there's a version of Ports for Windows, which may work. ...or, if you could access/read data from the 'net, this unit (http://www.ararat.cz/synapse/) would be helpful.

-Steven
...if i knew all about this one thing, wouldn't that be something