## ToFromCelsius Clip by Eb. G.

Expand Messages
• ... First let me say, I think that is a real Neat little clip, but I think it needs to be de-mystified a bit, for the less experienced. The ^!SetArray
Message 1 of 6 , Aug 7, 2000
• 0 Attachment
At 01:06 PM 8/5/2000 -0400, Eb Guenther wrote:

>H="ToFromCelsius"
>;long line (one of two lines, total)
>^!SetArray %Switch%=^?{Number degrees?};^?{F or C?==_F^=°F;5/9;°C|C^=°C;9/5;°F}
>;long line
>^!Info ^%Switch1%^%Switch2% = ^\$Calc((^%Switch1%+40)*^%Switch3%-40)\$^%Switch4%
First let me say, I think that is a real Neat little clip, but I think it needs to be de-mystified a bit, for the less experienced.

The ^!SetArray %Switch%=... creates a 4 element array containing either:

Element 1 - nn degrees (or) nn degrees
Element 2 - °F °C
Element 3 - 5/9 9/5
Element 4 - °C °F

dependent on the selection in the clip wizard.

The ^!Info statement uses the ^%Switchn% syntax where n = the element number:
(^%Switch1%^%Switch2% = ^\$Calc((^%Switch1%+40)*^%Switch3%-40)\$^%Switch4%)
nn°F = ^\$Calc((nn+40)*5/9-40)\$°C
(or) nn°C = ^\$Calc((nn+40)*9/5-40)\$°F

I hope this helps some of you understand this more clearly.
Charlie.