Sometimes when I check out other people’s code I see things that I never do when I program. Sometimes they are kind of cool and if I like it enough, it becomes part of my workflow. While looking at some code the other day I saw something that I have never seen before. Variables defined in a comma delimited list. Below is how I normally go about defining variables.
var red:uint; var grn:uint; var blu:uint; var i:Number; var f:Number; var p:Number; var q:Number; var t:Number;
The above can also be defined shorthanded using a few less lines. It’s a little thing, but you end up not rewriting the variable declaration every time this way.
var red:uint, grn:uint, blu:uint; var i:Number, f:Number, p:Number, q:Number, t:Number;
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.