Jump to content
georges pletinckx

New installation and old program

Recommended Posts

Hello, I don't know if I am at the right place.

I installed Delphi and I want to work on an old program.

I want to edit a .pas file and i get this on screen (see the attach file). How can I solve this?

Thx

pasfile.jpg

Share this post


Link to post

It looks like you Calcul.pas file is not a Delphi source code. Given we see "EXIF", it is possible that it is a JPG or other image format.

 

If you open Calcul.pas using Notepad, does it display garbage?

 

Share this post


Link to post

That looks like your file system may be corrupted if a .pas is opening that way. Worth looking at a backup (hopefully you have external version control like github). Worth running a chkdsk on your drive and check other sources too that you may rely on.

Edited by darnocian

Share this post


Link to post
24 minutes ago, darnocian said:

That looks like your file system may be corrupted if a .pas is opening that way. Worth looking at a backup (hopefully you have external version control like github). Worth running a chkdsk on your drive and check other sources too that you may rely on.

Nope, by looking at the first four Bytes it really looks like a Jpeg signature, at least they start same way, but why an image file got a .pas extension... ask @georges pletinckx

So I hope for him he still got a backup somewhere flying around.

Share this post


Link to post
1 hour ago, KodeZwerg said:

Nope, by looking at the first four Bytes it really looks like a Jpeg signature

@KodeZwerg That is basically the same answer as I gave yesterday...

He probably got a screen dump of the source code as a jpg image and renamed the file to .pas thinking this is the way to get the actual source code 😄😄😄 Of course it isn't...

  • Haha 1

Share this post


Link to post

... try renaming the file back to .jpg and then try to open it with a photo viewer app and see !

Share this post


Link to post
1 hour ago, georges pletinckx said:

Hello, no I didn't because it must be a pas file. I goes to the history ans i bring the last calcul.pas and it's ok

Well, how do you explain that a .PAS file actually contained JPG data? If you have not renamed, you copied a jpg over a pas file.

btw: There is no shame to make an error. That's how we learn.

Share this post


Link to post

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

×