[fpc-pascal] ppcjvm issues
noreply at z505.com
Sun Jan 8 02:45:49 CET 2017
On Sat, January 7, 2017 10:09 am, Jon Foster wrote:
> On 01/07/2017 03:06 AM, Tomas Hajny wrote:
>> On Sat, January 7, 2017 03:12, Jon Foster wrote:
>> 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)
>>> 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
>>> instead it will compile. Seems odd.
>> I can't comment the first part, but where exactly is a type named
>> 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.
This is one of the main reasons, I'm afraid of things like jvm/llvm and
even objectivefpc macOS mode because your brain starts juggling multiple
ideologies.. and your brain must have a modeswitch that is fuzzy (not
always switched in one mode, sometimes several) ;-)
> 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.
Well, fpc has Math unit which has float related tools and type that is not
quite the same. But as another poster said, that float in math unit
doesn't match up to Java's
More information about the fpc-pascal