web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Is there Sign() function in x++ ?

(0) ShareShare
ReportReport
Posted on by 596

Hi guys,

If I have variable with a value with negative sign, and then when I have other variable, how to make this other variable have the same sign as the 1st variable in x++ ? Is there a Sign() function in x++ ?

Thanks

I have the same question (0)
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    RE: Is there Sign() function in x++ ?

    I am not aware of sign function.

    For your requirement you can just give if condition and check if other variable is less or greater than 0 and make the present variable value accordingly.

  • Verified answer
    GirishS Profile Picture
    27,825 Moderator on at
    RE: Is there Sign() function in x++ ?

    Hi Lars Volt,

    Use Global::sign(real number);

    Thanks,

    Girish S.

  • Verified answer
    huijij Profile Picture
    19,811 on at
    RE: Is there Sign() function in x++ ?

    Hi Voltes,

    Global class contains a sign function which you can refer to.

    5548644.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 686 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 585 Most Valuable Professional

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 565

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans