Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GWBASIC DEF Function
#1
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
Reply
#2
(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.
Reply
#3
(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!
Reply




Users browsing this thread: 3 Guest(s)