The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 reading of pascal real (48bit)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

aimoaimo

Germany
2 Posts

Posted - 09/21/2001 :  04:56:00 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I am looking for a labtalk procedure to read in binary data which is of the Borland Pascal "real" type (48bit). The FUM (OriginPro 6.1) do not seem to be able to handle these numbers directly.

Thanks,
Aimo.


greg

USA
1379 Posts

Posted - 09/21/2001 :  12:54:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Since you have access to the individual bytes and you can manipulate these bytes at the bit level, you would need to write your own code to translate these values. You could read in the 6 byte sequence (???) as


  • b1
  • b2
  • b3
  • b4
  • b5
  • b6


and then use bit-wise boolean logic to create the value, as in something like

value = (b1 + 256 * (b2 + 256 * (b3 + 256 * (b4 + 256 * b5)))) * (b6 + 128)^2


The expression above won't work because I have no idea what a Borland Pascal "real" looks like, but you should be able to figure that out from their documentation.


Go to Top of Page

marko

Germany
112 Posts

Posted - 09/26/2001 :  06:04:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I personally would prefer to write a custom DLL for this purpose, preferably in Delphi or Borland Pascal itself to avoid any confusion.

Go to Top of Page

aimoaimo

Germany
2 Posts

Posted - 10/05/2001 :  12:30:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

thanks for the anwsers. I have used an external converter program which I wrote in Pascal. It works fine. I just thought that it would be safer if I wouldn't have to rely on calling the external program from labtalk.

Thanks
Aimo.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000