Amazon.com Widgets 16-4 Simple way
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 17, 2014, 11:57:02 AM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Answers to Exercises
| | |-+ Chapter 16 (Moderator: sgg_admin)
| | | |-+ 16-4 Simple way
Pages: [1] Go Down
Print
Author Topic: 16-4 Simple way (Read 842 times)
tadej5553
Full Member
***
Posts: 145


Email




on: January 17, 2010, 03:09:47 AM

main.m
Code: (Objective-C)
#import <Foundation/Foundation.h>

int main (int argc, const char * argv[])

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
   
    NSProcessInfo *proc = [NSProcessInfo processInfo];
   
    NSLog(@"Globally unique string:   %@", [proc globallyUniqueString]);
    NSLog(@"Arguments:                %@", [proc arguments]);
    NSLog(@"Process Name:             %@", [proc processName]);
    NSLog(@"Process Indentifier:      %i", [proc processIdentifier]);
    NSLog(@"Host Name:                %@", [proc hostName]);
    NSLog(@"Enviroment:               %@", [proc environment]);
    NSLog(@"Operating System:         %i", [proc operatingSystem]);
    NSLog(@"Operating System Name:    %@", [proc operatingSystemName]);
    NSLog(@"Operating System Version: %@", [proc operatingSystemVersionString]);
    NSLog(@"Physycal memory:          %llu", [proc physicalMemory]);
    NSLog(@"Processor count:          %i", [proc processorCount]);   
    NSLog(@"Active Processor Count:   %i", [proc activeProcessorCount]);
   
    [pool drain]; 
    return 0; 
}
Logged
Pages: [1] Go Up
Print
Jump to:



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.