|
[Sponsors] |
if (NNULLP(T_STORAGE_R_NV(t0, SV_UDSI_G(0)))) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 3, 2020, 08:12 |
if (NNULLP(T_STORAGE_R_NV(t0, SV_UDSI_G(0))))
|
#1 |
Senior Member
Join Date: Feb 2020
Posts: 114
Rep Power: 6 |
I want to know what will happen if the gradient of uds is not allocated. Can it lead to that all the Statements relevant to C_UDSI_G will not be executed?or something else.
|
|
October 5, 2020, 02:23 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
NNULLP returns TRUE if storage is allocated for user-defined storage variable
in case the storage has not been allocated if statement will not be executed
__________________
best regards ****************************** press LIKE if this message was helpful |
|
October 5, 2020, 23:11 |
|
#3 |
Senior Member
Join Date: Feb 2020
Posts: 114
Rep Power: 6 |
so how do I know the statement is executed, can I add a printf statement to help me judge?so the NNULLP conditional judgment statement just help to let me know the storage has or hasn't been allocated,it won't affect the other code to be executed,am I right?
|
|
October 6, 2020, 04:42 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
NNULLP conditional i needed to prevent the case, when you read gradient (or any other variable) value , but memory was not allocated.
In that case you will get an error you can put printf inside if statement, it is recommended to use Message macro in fluent instead of printf
__________________
best regards ****************************** press LIKE if this message was helpful |
|
October 6, 2020, 06:58 |
|
#5 | |
Senior Member
Join Date: Feb 2020
Posts: 114
Rep Power: 6 |
Quote:
then if I use NNULLP and memory is just not allocated,what it would show? |
||
Tags |
udsi |
|
|