I noticed in the latest logfile:
// 10.090
// Compiler:
// Can assign types when declaring:
// LOCAL foo as Tfoo = bar
Are we closer to be able to use this in FUNCTION parameters for specifying a default for TYPE variables, such as:
GLOBAL fontDefault AS TFont
GLOBAL fontHeading AS TFont
FontPrint "Using the default font", 0, 0
FontPrint "This is for a heading", 0, 100, fontHeading
FUNCTION FontPrint: text$, x%, y%, font AS TFont = fontDefault
....
ENDFUNCTION
If not, it would be nice to have optional TYPE parameters by using a 'NULL' concept such as:
FUNCTION FontPrint: text$, x%, y%, font AS TFont = NULL
IF font = NULL THEN font = fontDefault
....
ENDFUNCTION
I'll put it on the todo. It's just a c++ compiler error, the GPC already accepts it.