Top

temperature converter identifier


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Jan 28, 2009
Last Updated  Jan 29, 2009
Tags  celcius  converter  fahrenheit  sassirc  temperature 

Introduction

Usage:
$temp(<temperature>,<c|f|k|ran|rea>).<c|f|k|ran|rea>

About:
$temp(100,c).f
will convert 100 degrees celcius into fahrenheit
$temp(100,f).c
will convert 100 degrees fahrenheit into celcius

k = Kelvin
c = Celcius
f = Fahrenheit
ran = Rankine
rea = Reaumur

example:
//msg $chan its about $temp(40,c).f
[13:29] <~Rage_Virus> its about 104 degrees Fahrenheit

this code is to be put in your "aliases" tab

Grab the Code

;  $temp(<temperature>,<c|f|k|ran|rea>).<c|f|k|ran|rea>
 
/temp {
  ; Fahrenheit to Celcius/Kelvin/Rankine/Réaumur
  if ($2 == f) {
    if ($prop == c) { return $calc($calc($($1) - 32) * 5/9) degrees Celcius }
    elseif ($prop == k) { return $calc(5/9 * $calc($1 - 32) + 273.15) degrees Kelvin }
    elseif ($prop == ran) { return $calc($1 + 459.67) degrees Rankine }
    elseif ($prop == rea) { return $calc($calc($1 - 32) / 2.25) degrees Réaumur }
  }
  : Celcius to Fahrenheit/Kelvin/Rankine/Réaumur
  elseif ($2 == c) {
    if ($prop == f) { return $calc($calc($1 * 9/5) + 32) degrees Fahrenheit }
    elseif ($prop == k) { return $calc($1 + 273.15) degrees Kelvin }
    elseif ($prop == ran) { return $calc($calc($1 + 273.15) * 9/5) degrees Rankine }
    elseif ($prop == rea) { return  $calc($1 * 0.8) degrees Réaumur }
  }
  : Kelvin to Celcius/Fahrenheit/Rankine/Réaumur
  elseif ($2 == k) {
    if ($prop == c) { return $calc($1 - 273.15) degrees Celcius }
    elseif ($prop == f) { return $calc($calc($1  * 9/5) - 459.67) degrees Fahrenheit }
    elseif ($prop == ran) { return $calc($1 * 9/5) degrees Rankine }
    elseif ($prop == rea) { return $calc($calc($1 - 273.15) * 0.8) degrees Réaumur }
  }
  ; Rankine to Celcius/Fahrenheit/Kelvin/Réaumur
  elseif ($2 == ran) {
    if ($prop == c) { return  $calc($calc($calc($1 - 32) - 459.67) / 9/5) degrees Celcius }
    elseif ($prop == f) { return $calc($1 - 459.67) degrees Fahrenheit }
    elseif ($prop == k) { return $calc($1 / 9/5) degrees Kelvin }
    elseif ($prop == rea) { return $calc($calc($1 - 32 - 459.67) / 9/4) degrees Réaumur }
  }
  ; Réaumur to Celcius/Fahrenheit/Kelvin/Rankine
  elseif ($2 == rea) {
    if ($prop == c) { return $calc($1 * 10/8) degrees Celcius }
    elseif ($prop == f) { return $calc($calc($1 * 9/4) + 32) degrees Fahrenheit }
    elseif ($prop == k) { return $calc($calc($1 * 10/8) + 273.15) degrees Kelvin }
    elseif ($prop == ran) { return $calc($1 * 2.24) degrees Rankine }
  }
}

Comments

  (6)  RSS
napa182
Comments: 1,455
 
mIRC Snippet:  temperature converter identifier
Posted on Jan 28, 2009 9:08 pm
what about Kelvin, Rankine, and Réaumur?
Aucun50
Comments: 548
 
mIRC Snippet:  temperature converter identifier
Posted on Jan 28, 2009 9:12 pm
How do i use? TEMP Unknown command
napa182
Comments: 1,455
 
mIRC Snippet:  temperature converter identifier
Posted on Jan 28, 2009 9:13 pm
put it in aliases and do //echo -a $temp( <temperature> , <c|f> )

ffs read the intro
TheImrac
Comments: 64
 
mIRC Snippet:  temperature converter identifier
Posted on Jan 28, 2009 11:11 pm
Code:
alias temp {
  If ($2 == f) return $calc(($1 - 32) * 5/9) degrees Celcius
  ElseIf ($2 == c) return $calc($1 * 9/5 + 32) degrees Fahrenheit
}
PunkTuReD
Comments: 461
 
mIRC Snippet:  temperature converter identifier
Posted on Jan 28, 2009 11:15 pm
lol
@napa im working on it but im havin a bit of difficulties
@Thelmrac ok ok im onto it

edited to include
Kelvin, Rankine, and Réaumur
Aucun50
Comments: 548
 
mIRC Snippet:  temperature converter identifier
Posted on Jan 29, 2009 1:35 am
WOW! Nice 8/10 cus i like to see the temperature in different ways :)

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom