On 9/26/11 4:39 PM, Bradley Pietrzak wrote:
> Thank you again for your responses. Unfortunately, I have encountered
> another problem, this time involving code that has been escaped to C. The
> new version of my program is shown below. Without the re-entrant option,
> the code runs perfectly fine. With the re-entrant option, however, I am met
> with several errors. The SNL user's manual says that the SNC automatically
> refers to variables in the struct UserVar by running the code " pVar->xxx",
> but that such references have to be handled manually for escaped C code. How
> do I handle such situations manually?
Hi, Brad.
In your example, you would need to do:
%% helloWorld(pVar->i);
Or, if you are wanting to do more things within your helloWorld
function, you could call it like this:
%% helloWorld(ssId, pVar);
with the function changed to:
void helloWorld(SS_ID ssId, struct UserVar *pVar) {
printf("Hello World! You have just called a C function, "
"and the variable i is %5.1f \n", pVar->i);
}
Lewis
- Replies:
- Re: Combing Two State Sets into One Bradley Pietrzak
- References:
- Re: Combing Two State Sets into One Bradley Pietrzak
- Re: Combing Two State Sets into One Ned Arnold
- Re: Combing Two State Sets into One Bradley Pietrzak
- Navigate by Date:
- Prev:
Re: Combing Two State Sets into One Eric Norum
- Next:
RE: Sequence monitor not getting callback Zelazny, Michael Stanley
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Combing Two State Sets into One Eric Norum
- Next:
Re: Combing Two State Sets into One Bradley Pietrzak
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|