Re: Eu 4.0.0 minor question: sequence terminator?

new topic     » goto parent     » topic index » view thread      » older message » newer message
AndySerpa said...

As I learn the new version I have questions. So far no meaty ones (until I experiment), but ran across this new optional sequence terminator, e.g. {1,2,$} which says for convenience with lists that may change during development, etc.

Can someone explain what the benefit is? I couldn't think of why it would be helpful...

Consider this ...

enum -- colors 
    Red, 
    Blue, 
    Yellow, 
    Purple, 
    Orange 

Now let's say I wish to add Green to the list. I must add a comma to 'Orange' and then add 'Green' without a comma.

Later if I want to remove 'Green', I must remove it and the comma from 'Orange'.

However with the $ trick ...

enum -- colors 
    Red, 
    Blue, 
    Yellow, 
    Purple, 
    Orange, 
    $ 

I just insert 'Green,' before the '$'. To remove 'Green' I just remove it.

Sure it's a small thing, but after a short while its these little things that add up to programmer productivity.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu