Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 348017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:19:31+00:00 2026-05-12T11:19:31+00:00

For example: – (BOOL)compare:(NSDecimal)leftOperand greaterThan:(NSDecimal)rightOperand { NSComparisonResult result = NSDecimalCompare(&leftOperand, &rightOperand); // rest not

  • 0

For example:

- (BOOL)compare:(NSDecimal)leftOperand greaterThan:(NSDecimal)rightOperand {
    NSComparisonResult result = NSDecimalCompare(&leftOperand, &rightOperand);
    // rest not important
}

like you can see, the method just receives these two types of NSDecimal, leftOperand and rightOperand. Then it passes them on to a C API function which likes to have them by reference. Sorry if that’s the wrong term, didn’t study that stuff. Currect me if I’m wrong 🙂

I want to modify this method in such a way, that I can also accept parameters the way that function does. I think that’s clever, because the method won’t copy the parameters (I believe it does). What would I have to add in there in order to get this reference thing right? And after that, my parameters are just references, right? How would I pass these then along to the NSDecimalCompare function?

I slighlty remember there was some dereferencing operator around for that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:19:32+00:00Added an answer on May 12, 2026 at 11:19 am

    Try:

    - (BOOL)compare:(const NSDecimal*)leftOperand greaterThan:(const NSDecimal*)rightOperand {
        NSComparisonResult result = NSDecimalCompare(leftOperand, rightOperand);
        // rest not important
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Example http://econym.org.uk/gmap/example_maptypecontrols2.htm Let's say I have 100 markers with info windows. How do I
Example: This is just\na simple sentence . I want to match every character between
My example non-parsed data is 8$154#3$021308831#7$NAME SURNAME#11$2166220160#10$5383237309#52$05408166# I want to parse data that is
The example is pretty straight forward, I am trying to change focus button after
For example (it is a bad example for the purpose of my question), i
For example: var $myContainer = $('#myContainer'); $myContainer.html(someHtml); var width = $myContainer.height(); var height =
For example how do you push code to specific heroku application using the heroku_san
For example lets consider the following 2 codes: for (i = 0; i <
For example $('.some-class') returns 3 elements. I need to get only one of them,
when i view my site : http://www.testtrack.tv/ in IE8's compatibility-mode the horizontal scrollpanes turn

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.