Sponsored Content
Top Forums Programming Some questions regarding old if.c Post 302930221 by ongoto on Wednesday 31st of December 2014 03:45:07 PM
Old 12-31-2014
I meant no offense.
I'm just going along with what you said. The questions you raised supports the fact that it doesn't make any sense, right?

if (exp()) is asking if the function exists; it's not calling that function.
p1 is not assigned to e1(), e2(), etc; p1 is a pointer to (the address of) those functions. By doing that it's redirecting the search for special characters (-r, -w, -c, etc.). The logic is: "If you don't find what you want here, I'll provide you another place to look", and so on.

A typical if statement would be something like...
if ( x = y ) { then do something
The source you provided checks for the characters '{} () = !=' and other options. In other words it's just checking for proper syntax and storing arguments for some later action. That's about all it's good for. Eventually it will return true or false or error.

Last edited by ongoto; 01-01-2015 at 03:01 PM..
This User Gave Thanks to ongoto For This Post:
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

i got some questions :)

Hi! Im new to all this but the computer club im in has unix i think. now my questions. 1.is it NTFS i need to partion the harddrive with to be able to use unix? 2.Unix and Linux whats the diffrense?yes im a noob got no idea been using crap windows for ages and hate it. 3.I got a win98... (2 Replies)
Discussion started by: Pierre
2 Replies

2. Programming

C questions

What does "extern" do? ex. extern int x; and another question, what about using static in functions? like: static void foo(), why? (2 Replies)
Discussion started by: Esaia
2 Replies

3. Solaris

2 Questions

Hello Everbody I hope you can give me a hand, I have some questions The first one itīs about some message that I donīt know what means, I was looking about it. but nothing. This is the message rsh: connection from bad port bsd-gw: Error reading from connection: Bad file number And my... (4 Replies)
Discussion started by: lo-lp-kl
4 Replies

4. UNIX for Dummies Questions & Answers

Just a few questions.

Hi everyone im new to this forums, i just wanted to get started by asking a few question(Im a Unix newbie) 1. How do i sort a file called "dirr" in a ascending order on the 3rd column 2. what does alias on=who do Thanks in advance!!! (1 Reply)
Discussion started by: Da Paper
1 Replies

5. Programming

two questions

hey all, I have question when am writing simple shell... in the child am calling execvp, i want the parent to know when execvp returns - 1. how can i let the parent know the result of execvp thanks in advance (9 Replies)
Discussion started by: joey
9 Replies

6. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

7. UNIX for Dummies Questions & Answers

Just had a few questions

1) The lpr and sort utilities accept input either from a file named on the command line or from standard input. a)Name two other utilities that function in a similar manner. b)Name a utility that accepts its input only from standard input. 2) Explain the following error message. What... (10 Replies)
Discussion started by: youngyou
10 Replies

8. UNIX for Dummies Questions & Answers

Vi questions

Hello, I would like to know how we can highlight/select a section of a file in vi and delete that section if we don't want to use the dd command to delete one line at at time. There is one where we don't want to delete the whole line , but up to a certain word. (2 Replies)
Discussion started by: Pouchie1
2 Replies
exp(3M) 						  Mathematical Library Functions						   exp(3M)

NAME
exp, expf, expl - exponential function SYNOPSIS
cc [ flag... ] file... -lm [ library... ] #include <math.h> double exp(double x); float expf(float x); long double expl(long double x); DESCRIPTION
These functions compute the base-e exponential of x. RETURN VALUES
Upon successful completion, these functions return the exponential value of x. If the correct value would cause overflow, a range error occurs and exp(), expf(), and expl() return HUGE_VAL, HUGE_VALF, and HUGE_VALL, respectively. If x is NaN, a NaN is returned. If x is +-0, 1 is returned. If x is +Inf, x is returned. For exceptional cases, matherr(3M) tabulates the values to be returned by exp() as specified by SVID3 and XPG3. See standards(5). ERRORS
These functions will fail if: Range Error The result overflows. If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, the overflow floating-point exception is raised. The exp() function sets errno to ERANGE if the result overflows. USAGE
An application wanting to check for exceptions should call feclearexcept(FE_ALL_EXCEPT) before calling these functions. On return, if fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an exception has been raised. An application should either examine the return value or check the floating point exception flags to detect exceptions. An application can also set errno to 0 before calling exp(). On return, if errno is non-zero, an error has occurred. The expf() and expl() functions do not set errno. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
feclearexcept(3M), fetestexcept(3M), isnan(3M), log(3M), math.h(3HEAD), matherr(3M), mp(3MP), attributes(5), standards(5) SunOS 5.10 1 Nov 2003 exp(3M)
All times are GMT -4. The time now is 06:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy