[fpc-pascal] ppcjvm issues

Jon Foster jon-lists at jfpossibilities.com
Sat Jan 7 18:09:39 CET 2017

On 01/07/2017 03:06 AM, Tomas Hajny wrote:
> On Sat, January 7, 2017 03:12, Jon Foster wrote:
> Hello,
> You didn't mention that you weren't subscribed to the list, but since this
> seemed to be the case, I included your address in Cc:.
Thanks for this. I get a lot of mail from the FPC lists ... but it looks 
like its from the devel list. I originally subscribed to this list in Feb. 
2015. I must have been evicted. Not sure why. I've re-subscribed. I'll try 
not to get booted again.
>> The second issue I ran into:
>> function f(x, y: integer): float;
>> begin
>>       result:=float(dy)/float(dx)
>> end;
>> When attempting to compile this it tells me that "float" is undefined. I
>> think I'm missing something here. "float" is the native Java name for
>> their
>> base floating point type and its a valid type for FPC. If I use "single"
>> instead it will compile. Seems odd.
> I can't comment the first part, but where exactly is a type named "float"
> defined in FPC (which unit)? E.g. single is defined in unit System and
> thus available for all FPC programs automatically. If some unit defines
> "float" (not sure about that, but it might be the case). I can see the
> System unit for Java defining "jfloat" as an alias to single - maybe you
> meant that one?
> Hope this helps
Yes, you're right. Sorry too many languages to deal with. And working in 
this quasi-java-fpc world is bending my brain. So to sum up:

   fpc doesn't have a float type.
   Java does. Since its in the "java" namespace its named "Jfloat" in FPC.
   The native FPC equivalent is single.

THX - Jon

Sent from my Debian Linux laptop -- http://www.debian.org/intro/about

Jon Foster
JF Possibilities, Inc.
jon at jfpossibilities.com
Making computers work for you!

More information about the fpc-pascal mailing list