Hi,

Von: Scott Robison

> On Wed, Jul 23, 2014 at 9:46 PM, J Decker <d3c...@gmail.com> wrote:
> 
> > Seems like adding hex interpreting is just adding code for the sake of
> > adding code.
> > Unless the data is coming from some pre written text file, isn't just
> > just as easy to format an into into decimal as it is for hex without
> > having to add extra characters for the prefix?
> >
> 
> One desirable aspect of code is that it is easily understood, that future
> modifications / changes be as easy as possible. It is usually much easier to
> see that 0x40000000 is a single bit set in a 32 bit integer vs seeing the
> number 1073741824 and wondering exactly what it means. At least it is to me.
> 
> For that reason, I think adding hex constants to the parser is a good idea.
> If I were expressing wishes, I'd suggest adding binary constants (with a 0b
> prefix) but that's probably pushing luck. :)
> 
> But no octal! At least not using the C syntax. I like being able to prefix a
> decimal integer with 0 and not having it change the meaning (which can't be
> done in C).

Python 3, Rust and others adopted the syntax 0o123 for octal literals.

The IEC 61131 languages use the syntax base#value, so 16#12ab is a hex number,
and 8#123 is an octal number.


Best regards

Markus Schaber

CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH

Inspiring Automation Solutions

3S-Smart Software Solutions GmbH
Dipl.-Inf. Markus Schaber | Product Development Core Technology
Memminger Str. 151 | 87439 Kempten | Germany
Tel. +49-831-54031-979 | Fax +49-831-54031-50

E-Mail: m.scha...@codesys.com | Web: http://www.codesys.com | CODESYS store: 
http://store.codesys.com
CODESYS forum: http://forum.codesys.com

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade 
register: Kempten HRB 6186 | Tax ID No.: DE 167014915

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received
this e-mail in error) please notify the sender immediately and destroy this 
e-mail. Any unauthorised copying, disclosure
or distribution of the material in this e-mail is strictly forbidden.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to