Author Topic: another 64bit issue  (Read 1550 times)

0 Members and 1 Guest are viewing this topic.

jcfuller

  • Guest
another 64bit issue
« on: February 03, 2018, 10:03:26 AM »
Charles,
  The file: examples\Parameters\overloding.o2bas will not run as a 64 bit app.
No errors on compile using exo2 -c  examples\Parameters\Overloding.o2bas.
I added this to the top of the code
Code: [Select]
$ filename "overloding.exe"
#include "RTL64.inc"


James

Charles Pegge

  • Guest
Re: another 64bit issue
« Reply #1 on: February 03, 2018, 11:29:22 AM »
Hi James,

The problem is a little obscure, but seems to occur in minimalist functions without local variables, such as these. It is fixed by creating a local variable in the function (any will do), or use an explicit str(..) in the return expression. I will investigate further to pinpoint the cause.

Code: [Select]
% filename "t.exe"
uses rtl64

'FUNCTION OVERLOADING
'====================

function foo (long v) as string
return "long " str(v)
end function

function foo (double v) as string
return "double " str(v)
end function

function foo (string v) as string
return "string " str(v)
end function


long l=42
double d=42.5
string s="43"

print foo l
print foo d
print foo s

jcfuller

  • Guest
Re: another 64bit issue
« Reply #2 on: February 03, 2018, 11:53:40 AM »
Charles,
  Ok, and even more shorthand  with no & or + for the concatenation of the return :).
I was also thrown off a bit with byref as the default passing parameter while FreeBasic is byval and I'm used to byval with bc9Basic (c/c++).
I was probably aware of that at one time but ......

And yes I do know of #byval / #byref .

James
« Last Edit: February 03, 2018, 01:02:43 PM by jcfuller »

Charles Pegge

  • Guest
Re: another 64bit issue
« Reply #3 on: February 11, 2018, 09:47:56 AM »
Hi James,

I have added stack frames for implicit str and val conversions, and all seems well. I have been working on key demo programs to ensure they will work as 64bit binaries, but this is a gradual process, with over 1200 demos to consider.

https://github.com/Charles-Pegge/OxygenBasic/blob/master/OxygenProgress.zip

edcronos

  • Guest
Re: another 64bit issue
« Reply #4 on: February 11, 2018, 10:26:57 AM »
Thanks, Charles.
I can not even imagine the work that must be accommodating so many things
I lose myself even with simple things I try to do