[Gambas-user] An utility component for Gambas

Lewis Balentine lewis at ...3412...
Mon Dec 1 21:48:15 CET 2014


As an individual who rarely deals with "C" or "C++" I can not comment in 
that regard.Consider the target audience. I believe the suggested syntax 
would be more intuitive to a "Basic" programmer.

....however and old dog can learn new tricks.
Ref: http://www.cplusplus.com/reference/cstdlib/strtol/

It does seem like the strol() function is rather limited regards the 
notational convention. Perhaps mirroring the strol() function and then 
use it to implement the set of Hex$(), Dec$, Oct$(), Bin$() functions 
(noting that Hex$() is already implemented).

On 12/01/2014 02:29 PM, Tobias Boege wrote:
> On Mon, 01 Dec 2014, Lewis Balentine wrote:
>>   >> Octal is normally not needed with Gambas. Do you have any use of
>> that? <<
>>
>> Neither is "binary" best I can tell. It is still convenient to have
>> these tools available. One may not always be dealing with numbers
>> originating in Gambas or output targeting Gambas.
>>
>> Hex$(), Dec$(), Oct$(), Bin$()
>>
> Why not just mirror strtol() from the C library to Gambas then? It does
> these things for all bases from 2 to 36.
>




More information about the User mailing list