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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 reading of pascal real (48bit)

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
aimoaimo Posted - 09/21/2001 : 04:56:00 AM
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.


3   L A T E S T    R E P L I E S    (Newest First)
aimoaimo Posted - 10/05/2001 : 12:30:39 PM
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.
marko Posted - 09/26/2001 : 06:04:06 AM
I personally would prefer to write a custom DLL for this purpose, preferably in Delphi or Borland Pascal itself to avoid any confusion.

greg Posted - 09/21/2001 : 12:54:31 PM
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.



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000