[Gambas-user] An utility component for Gambas
Tobias Boege
taboege at ...626...
Mon Dec 1 21:37:09 CET 2014
On Mon, 01 Dec 2014, T Lee Davidson wrote:
> On 12/01/2014 02:35 PM, Beno??t Minisini wrote:
> > Maybe an Oct$() function inside the interpreter. Octal is normally not
> > needed with Gambas. Do you have any use of that?
>
> Perhaps only occasional use, but, yes. Stat.Mode returns the mode of a
> file as a decimal integer which is not very intuitive for someone used
> to working with CHMOD with octal numbers. Oct$(420) --> 644
>
Stat.Mode is an Integer. An integer is a value. There is no such thing as
a "decimal integer". It may be *stored* in a binary base in memory, it may
be *displayed* in decimal base if you Print it, but per se it doesn't have
any base attached to it. You only give an integer a base if you encode it
to a string.
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list