-
change (-) position
hello evryone
4-6=-2
what ac3 code to make it 4-6=2-
it mean how can i change (-) to right
thanks so mutch
-
Client Software Programmer
var equaled;
function subtract(a,b){
equaled = a-b;
if(equaled.toString().charAt(0)=="-"){
equaled=equaled.toString().split("-")[1]+"-"
}
return equaled
}
trace(subtract(4,6));
-
-
Client Software Programmer
-
.
Hi
Or another way for you to study Alloy, and Kofa.
PHP Code:
var c;
function moveMinus( a , b )
{
c = a - b;
if ( c < 0 )
{
c = c.toString().substr(1) + "-";
}
return c;
}
trace( moveMinus( 4 , 6 ) );
-
-
Client Software Programmer
yeah use fruitbeards, his if statement uses less processing power.
-
.
Hi,
Jealousy, sarcasm, I'm not sure?
Just another way instead of your long winded string things.
I know now, it's another excuse to reach 1000, use any you like Kofa, it was not intended to be a competition.
-
I'm a student who likes to learn from his professors and each professor has his own way of delivering information to his student
Finally all thanks and appreciation to all
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|