I am studying the example programs recently featured in XCB's Showcase (3D Labyrinth and Pacman), and I just saw that the compiler accepts a very neat way of declaring multiple variables - even of different types - on a single line.
You can do this:
DIM pacman AS AGENT, collChar AS BYTE, location AS WORD, number AS INT
I browsed the whole 3.x documentation, and I can't seem to find any reference to that.
This is quite useful because it matches the QuickBASIC & FreeBASIC way of doing the same thing, so any text editor's lexer which is based on those can parse a line like that just fine.
Specifically, Geany - the editor I use - can parse that line perfectly, while a line like this:
DIM pacman AS AGENT : DIM collChar AS BYTE : DIM location AS WORD : DIM number AS INT
makes it pick up only the first variable and doesn't "index" the rest.
Ooops, thanks for reminding me. Initially, I didn't document this feature because it didn't work well. But I fixed the bug later, just forgot to add the documentation :-) Will do.
I am studying the example programs recently featured in XCB's Showcase (3D Labyrinth and Pacman), and I just saw that the compiler accepts a very neat way of declaring multiple variables - even of different types - on a single line.
You can do this:
I browsed the whole 3.x documentation, and I can't seem to find any reference to that.
This is quite useful because it matches the QuickBASIC & FreeBASIC way of doing the same thing, so any text editor's lexer which is based on those can parse a line like that just fine.
Specifically, Geany - the editor I use - can parse that line perfectly, while a line like this:
makes it pick up only the first variable and doesn't "index" the rest.