QB64 Phoenix Edition
GWBASIC DEF Function - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Works in Progress (https://qb64phoenix.com/forum/forumdisplay.php?fid=9)
+---- Thread: GWBASIC DEF Function (/showthread.php?tid=2964)



GWBASIC DEF Function - doughayman - 08-18-2024

Hi,

I'm new to this forum, and to the QB64pe compiler.

I have a gwbasic retro football game that I wrote back in 1987, and am looking to compile it, so that it'll run on Windows 10 pro.

I have a line in my Basic program that your compiler doesn't support:

     DEF FNPLCONV(MC)=(31-MC)/2 

Any suggestion on how to work around this?

Thank you in advance,

Doug


RE: GWBASIC DEF Function - ahenry3068 - 08-18-2024

(08-18-2024, 10:04 PM)doughayman Wrote: Hi,

I'm new to this forum, and to the QB64pe compiler.

I have a gwbasic retro football game that I wrote back in 1987, and am looking to compile it, so that it'll run on Windows 10 pro.

I have a line in my Basic program that your compiler doesn't support:

     DEF FNPLCONV(MC)=(31-MC)/2 

Any suggestion on how to work around this?

Thank you in advance,

Doug



FUNCTION FNPLCONV#(MC AS SINGLE)
    FNPLCONV = (31-MC) / 2
END FUNCTION


Then in the rest of your code if there is a space between FN and PL then close that space.



RE: GWBASIC DEF Function - doughayman - 08-18-2024

(08-18-2024, 10:16 PM)ahenry3068 Wrote:
(08-18-2024, 10:04 PM)doughayman Wrote: Hi,

I'm new to this forum, and to the QB64pe compiler.

I have a gwbasic retro football game that I wrote back in 1987, and am looking to compile it, so that it'll run on Windows 10 pro.

I have a line in my Basic program that your compiler doesn't support:

     DEF FNPLCONV(MC)=(31-MC)/2 

Any suggestion on how to work around this?

Thank you in advance,

Doug



FUNCTION FNPLCONV#(MC AS SINGLE)
    FNPLCONV = (31-MC) / 2
END FUNCTION


Then in the rest of your code if there is a space between FN and PL then close that space.
Thank you very much, I will give that a try!