[futurebasic] Re: [FB] [FB^3] FN ReadLocation

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2000 : Group Archive : Group : All Groups

From: Chris Stasny <staz@...>
Date: Mon, 21 Feb 2000 14:21:13 -0600
>A few days ago someone asked about FN ReadLocation in FB^3 but I 
>didn't see the answer.
>This works for 68K but in PPC it bombs. Is the library name wrong?
>library "OSUtils"
>toolbox ReadLocation(@LONG)`0x205F, 0x203C, 0x000C, 0x00E4, 0xA051

#define Fract as long

begin record MachineLocation
dim latitude  as Fract
dim longitude as Fract
begin union
dim dlsDelta as SInt8/* signed byte; daylight savings delta */
dim gmtDelta as long/* use low 24-bits only */
end union
end record

toolbox ReadLocation(MachineLocation *myLoc) 
toolbox WriteLocation(const MachineLocation *myLoc) 

dim fred as MachineLocation

call ReadLocation(fred)
///call WriteLocation(fred)

print hex$(fred.latitude),hex$(fred.longitude)

print fred.latitude/1073741824.0,fred.longitude/1073741824.0

print hex$(fred.dlsDelta),hex$(fred.gmtDelta and 0xFFFFFF)



-STAZ  ~)~

800.348.2623 Orders  http://www.stazsoftware.com
228.255.7086 FAX     mailto:staz@...