Author Topic: Teaching old dogs new tricks  (Read 43 times)

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 538
    • View Profile
Teaching old dogs new tricks
« on: September 12, 2020, 11:09:13 PM »
I found two internal functions in BCX that hinted that the following was possible.  I did a little
research and found that this example is completely legitimate in C++ and extended compilers
like LccWin32 and Pelles C.

Let your imagination go crazy!



PRINT foo$( "BCX says ..." )
PRINT foo$( )



FUNCTION foo$ OPTIONAL ( a$ = "Hello" AS LPCTSTR, b$ = ", World!"  AS LPCTSTR )
  IF a$ <> "Hello" THEN
    FUNCTION = a$
  ELSE
    FUNCTION = a$ + b$
  END IF
END FUNCTION