Le Thu, 13 Aug 2015 11:19:09 +0200, Sprachschule Eilert <eilert-sprac...@t-online.de> a écrit:
> This produces a syntax error, but it doesn't tell me why: > > Private Const $TB As String = Chr$(9) > > If I leave "Const" away, it runs, so it shouldn't be the $TB which > disturbs, as it is accepted as a variable naming. The rest should be ok, > too. So I can't find any reason... > > Thanks for any hint > > Rolf > This is because calling functions is not allowed when defining a constant value. In your case, you have to use a string containing your character using an escape code : Private Const $TB As String = "\x09" 'Contains the ASCII character 9 Or, even better in your case : Private Const $TB As String = "\t" 'Contains the TAB character (ASCII 9) But I agree that the error message is not very clear ... Regards, -- Adrien Prokopowicz ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user