[Gambas-user] External C function usage error - IPC queue usage

Tobias Boege taboege at gmail.com
Mon Jan 22 22:50:13 CET 2018


On Mon, 22 Jan 2018, T Lee Davidson wrote:
> "Public MSGPERM As Integer = 0600"
> 
> "0600" in Gambas is the decimal number 600, not an octal number. I have searched and searched, and found no way to conveniently
> represent an octal number in Gambas. http://gambaswiki.org/wiki/cat/constants lists hexadecimal and binary.
> 
> Try:
> Public MSGPERM As Integer = (8 ^ 2 * 6) + (8 ^ 1 * 0) + (8 ^ 0 * 0)
> Or:
> Public MSGPERM As Integer = &X110000000
> Or:
> Public MSGPERM As Integer = 384
> 

According to the source code [1], the obvious "&o" prefix is supposed to
work but it doesn't compile here due to "Unexpected &". Probably a bug.

Regards,
Tobi

[1] https://gitlab.com/gambas/gambas/blob/master/main/gbc/gbc_trans.c#L281

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


More information about the User mailing list