| delorie.com/archives/browse.cgi | search |
| From: | Dave Bird <dave AT xemu DOT demon DOT co DOT uk> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Newbie Pointers |
| Date: | Sun, 21 Feb 1999 02:20:33 +0000 |
| Organization: | very little |
| Message-ID: | <TRnGRcAx12z2Ew6b@xemu.demon.co.uk> |
| References: | <36CF1710 DOT AED0C97 AT castle DOT on DOT ca> |
| NNTP-Posting-Host: | xemu.demon.co.uk |
| X-NNTP-Posting-Host: | xemu.demon.co.uk:158.152.196.209 |
| X-Trace: | news.demon.co.uk 919606503 nnrp-07:13676 NO-IDENT xemu.demon.co.uk:158.152.196.209 |
| X-Complaints-To: | abuse AT demon DOT net |
| MIME-Version: | 1.0 |
| X-Newsreader: | Turnpike (32) Version 4.01 <dQumtnY$x4rJ2u5tL5fS$n2vuP> |
| Lines: | 23 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
In article <36CF1710 DOT AED0C97 AT castle DOT on DOT ca>, balboa <balboa AT castle DOT on DOT ca>
writes
>Hello:
>
>eg;
>
>Does prototype float *function_name(float *var);
>
>Is the function a pointer to the return type?
The function returns a value whose type is pointer-to-float.
The parameter is also pointer-to-float.
Thus it could be....
static float x1=0;
float *function_name(float *var){
x1=(*var)+17; //get float value from the parameter
return &x1; //return address of a float variable
};
--
Dave[XEMU] ________________(....=^¬¬^=______ ---<,,">
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |