mIRC Homepage
Posted By: foshizzle small question - 06/01/08 04:56 PM
this is just a small question but how do u add x number of items for a number::
example

if %g = 5 then write 100000
Posted By: genius_at_work Re: small question - 06/01/08 05:02 PM
In your example, what do you want to write? Where?

-genius_at_work
Posted By: sparta Re: small question - 06/01/08 05:03 PM
write where and to what?

if %g == 5 { command }
Posted By: jaytea Re: small question - 06/01/08 05:03 PM
$str(0,%g) ? or perhaps

Code:
//var %g = 5, %x = 10 ^ %g | echo -a %x

Posted By: foshizzle Re: small question - 06/01/08 05:04 PM
i want to write a x number of zeros behind a 1 for the number of decimal places(its an identifier)
Posted By: genius_at_work Re: small question - 06/01/08 05:47 PM
Use exponents, as in the example above.

Code:

//echo -a $calc(10 ^ %g)



-genius_at_work
Posted By: OrionsBelt Re: small question - 06/01/08 05:51 PM
Jaytea already gave the answer I think...

//var %g = 5, %x = 1 | echo -a $+(%x,$str(0,%g))

Returns: 100000

Take a look at: /help $str
Posted By: foshizzle Re: small question - 06/01/08 09:10 PM
i know $str, just forgot it lol. does anyone know why its $str and not $rep or something lol
Posted By: Riamus2 Re: small question - 06/01/08 09:13 PM
Because you're adding a $string of characters. As far as why you don't consider it repeating the characters, I don't really know... Khaled had to pick one and he chose $str.
Posted By: foshizzle Re: small question - 06/01/08 09:19 PM
i knw it ment string but i dont know how that is better than $ran or something lol
Posted By: hixxy Re: small question - 06/01/08 09:41 PM
What is $ran?
Posted By: foshizzle Re: small question - 06/01/08 09:51 PM
lol, nothing i typed that wrong i ment $rep and im just saying that it should be called that then $str
Posted By: Riamus2 Re: small question - 07/01/08 12:16 AM
Too late to change it, so just accept it as-is. Besides, I think other languages use similar.
© mIRC Discussion Forums