Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.


Samstag, 25. Juni 2011, 10:55

Special syntax instead of "get(variable)"

Hi Klaus,

I see a lot of people (including me) making the mistake that I pass the variable name to an action instead of the content of the variable. That's the difference between "action(variable)" and "action(get(variable))" :-)

I know "get" has been introduced after the first release but nevertheless I still don't get used to that syntax because its so different compared to other programming languages (I am software developer). So, I came accross the idea whether you could introduce a special syntax for "content of a variable". My suggestion is to prefix a variable name with "%" or a "$".
The "%" would go in line with the parameters of a action but would mean variables are not allowed to start with numbers. If the "%" isn't a good choice I vote for "$".

I would love to write code like this: "action($variable)" instead of "action(get(variable))".

What do you think?



Samstag, 25. Juni 2011, 11:30


thanks for your suggestion, I will think about it - and yes, using $ would be possible,

best regards,


Mittwoch, 29. Juni 2011, 20:12

Just want to support this suggestion. I think it's a very good idea. If I'm not mistaken, the "%" syntax is even already possible in certain cases ( like "plugin[%var]")
PanoTag: Facebook tagging for krpano

KRPano development and more:


Mittwoch, 29. Februar 2012, 12:42

good suggestion

i would like to second gomi42's suggestion!

i think it would also be nice to use this mechanism to unify the mixed use of variables by now where they're handled with and without the get() statement.

as i'm programming a lot in php i think the consistent use of $
when dealing with variables, could do this job.
thomas bredenfeld

Ähnliche Themen