Sponsored Content
Full Discussion: Beginner Help
Top Forums Shell Programming and Scripting Beginner Help Post 302391147 by thibodeau on Saturday 30th of January 2010 04:45:22 PM
Old 01-30-2010
Good point... but the fact is that the function returns a fail when it should pass... could you look at the code to see if something's wrong in the actual function?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please help. I am a beginner.

Alrigt, I need to write a shell script where it counts the number of folders and files and dispays "My home directory has 'x' files and 'y' directories." So, I was thinking of doing this. set x = `ls | wc` so, if I have 8 files and folders in my home directory, x is not 8. now, I was... (1 Reply)
Discussion started by: Lykathea Aflame
1 Replies

2. Programming

Beginner C

Anyone know where I can get started in C++ programming in unix? Any good free tutorials or websites to start at? I am okay in unix scripting but have never done c programming of any sort... What are the main advantages of using C++ ? (2 Replies)
Discussion started by: frustrated1
2 Replies

3. UNIX for Dummies Questions & Answers

Beginner Help

hi guys, i have a DEl xps laptop cor 2 duo 2.2 i have vista installed on it i want to install a dual Boot UNIX on it.. can some one guide me ...cause i m tottaly new to UNIX i want to install unix on that laptop along with Vista.... thx any help would be deeply appreciated (sorry if i... (5 Replies)
Discussion started by: Farhan082
5 Replies

4. Shell Programming and Scripting

Need help for scripting beginner

hy guys, I have perl script provided to me but i need to convert it into shell .Can you help me in this using sed shell command. cat /etc/passwd |perl -ne '/^(\w+):\w+: (\w+)/ and print "$1, $2\n";' (1 Reply)
Discussion started by: singh_king
1 Replies

5. Shell Programming and Scripting

beginner's question

i write a shell program and i execute that after i made a bin directiry in my home directory(i didnt give any permissions) now i change to other directory.then i execute it bit it is saying " no such a file or directory" can any one help me please (2 Replies)
Discussion started by: wkbn86
2 Replies

6. UNIX for Dummies Questions & Answers

Beginner - What Should I Do First?

Hi people.... I have just started to learn unix.I want to know which version of Unix to install plus how to install it.I need to practise and make myself aware of how unix works.My thread is from an educational point of view.Also please feel free to give your suggestions as I am... (3 Replies)
Discussion started by: amit.kanade1983
3 Replies

7. Shell Programming and Scripting

Beginner looking for help

Hello, I am trying to write a script that reads names from a file called input, removes names if they have the same letter next to each other and prints the others. e.g. Colin & John would be printed Garry & Lynn would be removed My thinking is that I read in each name and... (3 Replies)
Discussion started by: colinireland
3 Replies

8. Programming

beginner to c programming

hii friends i m fairy new to c programming.can any one suggest some good websites and some good books for beginner (6 Replies)
Discussion started by: pankajchandel
6 Replies

9. Red Hat

Help me please i am beginner

i have windows 8 host on Dell Laptop vmware 9 redhat 7.2 iso downloaded through redhat official site after installation on vm it only boots into text dont show graphics Please guide:( (1 Reply)
Discussion started by: hananabbas
1 Replies

10. UNIX for Beginners Questions & Answers

Bash beginner

Hello so I've stored some csv data to be read into variables like this Name,Team,Shop,Shoe etc,etc,etc,etc Code: sep="," { while IFS=$sep read Name Team Shop Shoe do count=1 dirname=$Name while do ((count++)) dirname="${Name}$count" (4 Replies)
Discussion started by: darklord173
4 Replies
FPGETROUND(3)						   BSD Library Functions Manual 					     FPGETROUND(3)

NAME
fpgetround, fpsetround, fpsetprec, fpgetprec, fpgetmask, fpsetmask, fpgetsticky, fpresetsticky -- IEEE floating point interface SYNOPSIS
#include <ieeefp.h> typedef enum { FP_RN, /* round to nearest */ FP_RM, /* round down to minus infinity */ FP_RP, /* round up to plus infinity */ FP_RZ /* truncate */ } fp_rnd_t; fp_rnd_t fpgetround(void); fp_rnd_t fpsetround(fp_rnd_t direction); typedef enum { FP_PS, /* 24 bit (single-precision) */ FP_PRS, /* reserved */ FP_PD, /* 53 bit (double-precision) */ FP_PE /* 64 bit (extended-precision) */ } fp_prec_t; fp_prec_t fpgetprec(void); fp_prec_t fpsetprec(fp_prec_t precision); #define fp_except_t int #define FP_X_INV 0x01 /* invalid operation */ #define FP_X_DNML 0x02 /* denormal */ #define FP_X_DZ 0x04 /* zero divide */ #define FP_X_OFL 0x08 /* overflow */ #define FP_X_UFL 0x10 /* underflow */ #define FP_X_IMP 0x20 /* (im)precision */ #define FP_X_STK 0x40 /* stack fault */ fp_except_t fpgetmask(void); fp_except_t fpsetmask(fp_except_t mask); fp_except_t fpgetsticky(void); fp_except_t fpresetsticky(fp_except_t sticky); DESCRIPTION
The routines described herein are deprecated. New code should use the functionality provided by fenv(3). When a floating point exception is detected, the exception sticky flag is set and the exception mask is tested. If the mask is set, then a trap occurs. These routines allow both setting the floating point exception masks, and resetting the exception sticky flags after an excep- tion is detected. In addition, they allow setting the floating point rounding mode and precision. The fpgetround() function returns the current floating point rounding mode. The fpsetround() function sets the floating point rounding mode and returns the previous mode. The fpgetprec() function returns the current floating point precision. The fpsetprec() function sets the floating point precision and returns the previous precision. The fpgetmask() function returns the current floating point exception masks. The fpsetmask() function sets the floating point exception masks and returns the previous masks. The fpgetsticky() function returns the current floating point sticky flags. The fpresetsticky() function clears the floating point sticky flags and returns the previous flags. Sample code which prevents a trap on divide-by-zero: fpsetmask(~FP_X_DZ); a = 1.0; b = 0; c = a / b; fpresetsticky(FP_X_DZ); fpsetmask(FP_X_DZ); IMPLEMENTATION NOTES
The fpgetprec() and fpsetprec() functions provide functionality unavailable on many platforms. At present, they are implemented only on the i386 and amd64 platforms. Changing precision is not a supported feature: it may be ineffective when code is compiled to take advantage of SSE, and many library functions and compiler optimizations depend upon the default precision for correct behavior. SEE ALSO
fenv(3), isnan(3) HISTORY
These routines are based on SysV/386 routines of the same name. CAVEATS
After a floating point exception and before a mask is set, the sticky flags must be reset. If another exception occurs before the sticky flags are reset, then a wrong exception type may be signaled. BSD
December 3, 2010 BSD
All times are GMT -4. The time now is 08:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy