Hello,

the $prop refers to this part of an identifier : $().prop
The prop stands for "Property"

You'll understand better with some examples: (note that the following aliases are only examples of usage of $prop, not identifiers you should actually use, as there are better ways to accomplish things)

Code:

alias calcit {
  if !$prop { echo -a You must specify a property | return }
  if ($prop == min) { return $calc($1 - $2) }
  if ($prop == plus) { return $calc($1 + $2) }
}

So u can do:
//echo -a $calcit(2,3).plus which would then return the sum of $1 and $2, here being 5
//echo -a $calcit(2,3).min which would then return the remainder of $1 - $2, here being -1

$prop is really handy as you can simply create them yourself. So you can create properties in scripts of yours, simply by assigning different operations with different values for the property.

Another example:
Code:

alias colorit {
  if ($prop !isnum 1-15) { echo -a Pick a color code between 0 and 15 | return }
  return $+(,$iif($prop < 10,0),$abs($prop)) $1-
}

This is an identifier that will return the text you passed to the alias, in the color that you chose, thanks to the $prop identifier.

So u can do:
//echo -a $colorit(this is a test).7 will echo to you: this is a test
//echo -a $colorit(another test).4 will echo to you: another test

I hope that this has helped you to better understand the usage of the $prop identifier.


Greetz


Last edited by FiberOPtics; 04/05/04 01:01 PM.