Overriding a Read keyword

General FreeBASIC programming questions.
Post Reply
EkBass
Posts: 10
Joined: Oct 21, 2020 16:54
Contact:

Overriding a Read keyword

Post by EkBass »

Hi.

I cant figure out a way to override FB keyword Read. Im not even sure is it possible, but until i ask i cant know. Any suggestions?
fxm
Moderator
Posts: 12082
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Overriding a Read keyword

Post by fxm »

Allowed, but not recommended:

Code: Select all

#undef Read

Sub Read()
    Print "OK"
End Sub

Read()

Sleep
Any keyword may be needed internally by the compiler and removing it may lead to strange and unexpected results.
EkBass
Posts: 10
Joined: Oct 21, 2020 16:54
Contact:

Re: Overriding a Read keyword

Post by EkBass »

Thank you.
Post Reply