Absolute of Integer Variable

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
ahmedkhalid
Posts: 28
Joined: Mon May 26, 2014 8:51 pm
Has thanked: 4 times
Contact:

Absolute of Integer Variable

Post by ahmedkhalid »

Hello!
Can Anyone tell me how to take absolute of an integer variable? Is there any built-in function/command in flowcode v6 for such task?

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Absolute of Integer Variable

Post by medelec35 »

Hi ahmedkhalid,
Although absolute function is available:
Functions.png
(48.56 KiB) Downloaded 269 times
It will be used with float variables which are not handled well at all in 8 bit pics especially with the default built in boostc compiler (there are plans to change to a different compiler :) )
So as a simple solution using integer how about:
Absolute Value.png
(3.99 KiB) Downloaded 1329 times
?

I hope I have got it right as my maths skills are not the best.
Martin

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Absolute of Integer Variable

Post by kersing »

(moved this Flowcode 6 question to the Flowcode 6 part of the forum)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Post Reply