Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #89740

Re: Long Question: What might cause the seg fault?

From BartC <bc@freeuk.com>
Newsgroups comp.lang.c
Subject Re: Long Question: What might cause the seg fault?
Date 2016-06-21 23:53 +0100
Organization A noiseless patient Spider
Message-ID <nkcgi1$776$2@dont-email.me> (permalink)
References <nkcdmc$usf$1@dont-email.me> <nkcgea$776$1@dont-email.me>

Show all headers | View raw


On 21/06/2016 23:51, BartC wrote:
> On 21/06/2016 23:04, bilsch wrote:

> values. Try this:
>
> static int *fxf,*fyf,*fxof,*fyof,*fxm,*fym,*fdelay,*fglen;
>

You need 'static' in front of the float pointer declarations too of course.

With static, variables in a function keep their value for the next call 
of the function.

-- 
Bartc

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Long Question: What might cause the seg fault? bilsch <king621@comcast.net> - 2016-06-21 15:04 -0700
  Re: Long Question: What might cause the seg fault? BartC <bc@freeuk.com> - 2016-06-21 23:51 +0100
    Re: Long Question: What might cause the seg fault? BartC <bc@freeuk.com> - 2016-06-21 23:53 +0100
      Re: Long Question: What might cause the seg fault? bilsch <king621@comcast.net> - 2016-06-22 01:55 -0700
    Re: Long Question: What might cause the seg fault? John Gordon <gordon@panix.com> - 2016-06-22 00:25 +0000
  Re: Long Question: What might cause the seg fault? Jerry Stuckle <jstucklex@attglobal.net> - 2016-06-21 19:22 -0400
    Re: Long Question: What might cause the seg fault? John Gordon <gordon@panix.com> - 2016-06-22 00:17 +0000
  Re: Long Question: What might cause the seg fault? "James R. Kuyper" <jameskuyper@verizon.net> - 2016-06-21 19:35 -0400
    Re: Long Question: What might cause the seg fault? bilsch <king621@comcast.net> - 2016-06-22 03:36 -0700
  Re: Long Question: What might cause the seg fault? John Gordon <gordon@panix.com> - 2016-06-22 00:29 +0000
    Re: Long Question: What might cause the seg fault? bilsch <king621@comcast.net> - 2016-06-22 03:38 -0700
  Re: Long Question: What might cause the seg fault? Barry Schwarz <schwarzb@dqel.com> - 2016-06-21 21:20 -0700

csiph-web