Recent

Author Topic: How to compile *.pas with text-graphic  (Read 10582 times)

TJF

  • New Member
  • *
  • Posts: 12
How to compile *.pas with text-graphic
« on: April 22, 2016, 11:35:29 am »
Hello,

I changed a very, very old *.pas and want to compile it with freepascal. There is a lot of text graphic inside, which doesn't compile the way I want (see attachments).

What can I do?

Regards
Thomas

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • FPC developer.
Re: How to compile *.pas with text-graphic
« Reply #1 on: April 22, 2016, 11:44:19 am »
It seems to be an encoding issue, and is probably related to the target platform and terminal that you use. Could you specify that?

Try to configure the terminal (encoding) in the same way as the source code.


TJF

  • New Member
  • *
  • Posts: 12
Re: How to compile *.pas with text-graphic
« Reply #2 on: April 22, 2016, 11:57:19 am »
How can I do this?

Sorry, I am not very familiar with freepascal. And it is about 30 years ago, I wrote this with TP5.0...

uses dos,crt

I am using Windows (DOS).
« Last Edit: April 22, 2016, 12:10:34 pm by TJF »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • FPC developer.
Re: How to compile *.pas with text-graphic
« Reply #3 on: April 22, 2016, 12:46:56 pm »
This is not Free Pascal this is windows.  Create a shortcut to cmd.exe, and then browse the properties of that shortcut.

Or try "chcp 437" before executing.

The problem is that in dos all encodings were the same, source encoding, console encoding and system encoding. Now they are all different.

A FPC dos (go32v2 or msdos) program run under plain dos will still work.

TJF

  • New Member
  • *
  • Posts: 12
Re: How to compile *.pas with text-graphic
« Reply #4 on: April 22, 2016, 02:48:59 pm »
Using go32v2 shows the right graphik after compiling - but the program crashes ...

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • FPC developer.
Re: How to compile *.pas with text-graphic
« Reply #5 on: April 22, 2016, 03:00:08 pm »
Changing to 32-bit can bring out hidden flaws. Try compiling with -ghl and see if you get a traceback.

TJF

  • New Member
  • *
  • Posts: 12
Re: How to compile *.pas with text-graphic
« Reply #6 on: April 22, 2016, 03:32:34 pm »
crashes...

Thaddy

  • Hero Member
  • *****
  • Posts: 14364
  • Sensorship about opinions does not belong here.
Re: How to compile *.pas with text-graphic
« Reply #7 on: April 22, 2016, 05:17:43 pm »
crashes...
Well, then: it's weekend. Show
a) where it crashes It doesn't .
b) in the example sourcecode you are gonna write for us to demonstrate... and the codepage information from your system...
 ;D

As Marco says this is probably just a codepage issue and solved in minutes rather than months.
« Last Edit: April 22, 2016, 05:20:04 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

TJF

  • New Member
  • *
  • Posts: 12
Re: How to compile *.pas with text-graphic
« Reply #8 on: April 22, 2016, 07:23:43 pm »
My codepage is 850. Changing to 437 doesn't  change anything.

I don't want to waste your time. My hope was, that anybody knows how to compile files with text-graphic with freepascal AND that it is only a little step to do ...

Now I installed my old Borland Turbo Pascal 6.0 from the year (?) in WIN10 Pro and everything is compiling well. Freepascal cannot do the job or it is too complicated.

Best Regards
Thomas
« Last Edit: April 22, 2016, 07:36:48 pm by TJF »

wp

  • Hero Member
  • *****
  • Posts: 11912
Re: How to compile *.pas with text-graphic
« Reply #9 on: April 22, 2016, 07:40:08 pm »
Freepascal cannot do the job or it is too complicated.
Absolutely wrong! It's just that nobody exactly understands your issue. But without seeing what you are doing there can be many many possibilities. Why don't you just prepare a little demo and post the code here?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • FPC developer.
Re: How to compile *.pas with text-graphic
« Reply #10 on: April 22, 2016, 09:18:31 pm »
Freepascal cannot do the job or it is too complicated.

Free Pascal is a compiler with compatibility, not an emulator nor a mind-reader.

As said switching development system can expose hidden flaws. Playing ostrich is a a way to avoid thinking about such things, but usually with a limited lifespan. As you soon will find out running Tp6 on a 64-bit windows.
« Last Edit: April 22, 2016, 09:39:21 pm by marcov »

TJF

  • New Member
  • *
  • Posts: 12
Re: How to compile *.pas with text-graphic
« Reply #11 on: April 22, 2016, 09:41:41 pm »
It's just that nobody exactly understands your issue.

The generated text-graphic code in the first picture is very clear (and very old  :) ) and has nothing to do with mind-reading.


wp

  • Hero Member
  • *****
  • Posts: 11912
Re: How to compile *.pas with text-graphic
« Reply #12 on: April 22, 2016, 10:49:29 pm »
It's just that nobody exactly understands your issue.
The generated text-graphic code in the first picture is very clear (and very old  :) ) and has nothing to do with mind-reading.
You are talking about crashes, and show a partial screenshot of some code hiding the rest. No, this is mind-reading. And how do you think that, nowadays, anybody can create such ancient DOS code for testing to give you a hint? Once again: Please prepare a little demo from your TF6 files and post it, and you will have a solution shortly.

TJF

  • New Member
  • *
  • Posts: 12
Re: How to compile *.pas with text-graphic
« Reply #13 on: April 23, 2016, 11:04:37 am »
Ok wp, I understand!

Thank you! See attachment: A simple extract

Best regards
Thomas

TJF

  • New Member
  • *
  • Posts: 12
Re: How to compile *.pas with text-graphic
« Reply #14 on: April 23, 2016, 11:12:36 am »
And a second case. S. attachment...

frame  (4,3,75,3,2);
« Last Edit: April 23, 2016, 11:20:15 am by TJF »

 

TinyPortal © 2005-2018