How to determine the maximum value in Objective-C?

How do you find the maximum value longsupported on your system in an application in Objective-C? That is, how do we determine what the greatest value can represent long?

+3
source share
2 answers

As in C: include limits.h and look at LONG_MAX or INT_MAX.

+15
source
public class Main 
{
    public void displayMinAndMaxValuesOfLong() 
    {

        System.out.println(Long.MIN_VALUE);
        System.out.println(Long.MAX_VALUE);
    }
    public static void main(String[] args) 
    {
        new Main().displayMinAndMaxValuesOfLong();
    }
}
-9
source

Source: https://habr.com/ru/post/1779137/


All Articles