« Stupid Google Tricks | Main | RODC hotfix roll-up for XP/2003 compatibility »
Thursday
29May

Defining a constant in Powershell

set-variable -name Foo -value 3 -option constant

As opposed to 'Const Foo = 3'

Somehow I think that this could've been made...a bit less clunky?

(And now I'll just sit here and clock with an egg-timer how long it takes some deranged Powershell zealot to tell me how to shorten that into like 3 characters, or some such foolishness.  ;-))


Reader Comments (2)

Nope... that is as short as it gets.. wait

set-variable Foo -va 3 -op constant

What do you want a constant for?
For no other reason than to see if I -can-, really. :-)
May 30, 2008 | Registered CommenterLaura E. Hunter

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.