Recent

Author Topic: How do I use fpuname?  (Read 8549 times)

xircon

  • New Member
  • *
  • Posts: 25
How do I use fpuname?
« on: March 18, 2010, 10:47:33 pm »
Code: [Select]
program kuname;

uses  cthreads, baseunix,unix, unixtype, sysutils;

var KernelName: UtsName;

begin

 fpuname(KernelName);

end.     

Got so far, not sure how to get the info out.  Are there any simple examples?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11445
  • FPC developer.
Re: How do I use fpuname?
« Reply #1 on: March 18, 2010, 10:49:10 pm »
Simply writeln() ing the fields mentioned here:

http://www.freepascal.org/docs-html/rtl/baseunix/utsname.html

?

xircon

  • New Member
  • *
  • Posts: 25
Re: How do I use fpuname?
« Reply #2 on: March 18, 2010, 10:56:30 pm »
Thanks, been Googling for hours, trying to find that.

Code: [Select]
program uname;

uses  baseunix;

var KernelName: UtsName;

begin
 fpuname(KernelName);
 writeln(kernelname.sysname);
 writeln(kernelname.nodename);
 writeln(kernelname.release);
 writeln(kernelname.version);
 writeln(kernelname.machine);
 writeln(kernelname.domain);
end.
Tidied up and runs fine.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11445
  • FPC developer.
Re: How do I use fpuname?
« Reply #3 on: March 19, 2010, 10:47:03 am »
Thanks, been Googling for hours, trying to find that.

I always google first too (faster if it works), but if that doesn't yield results, manually lookup the
function in the manual. It is what it is there for!

 

 

TinyPortal © 2005-2018