<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Evaluating compound expression within ASSERT()</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34934/evaluating-compound-expression-within-assert</link><description>Hi, 
 
 My app was written on Windows PC/MSVC and is ported to nRF52/Keil. 
 In many places I&amp;#39;ve used MSVC assert() macro in the following manners: 
 
 assert(function(arg1, arg2) == SUCCESS) 
 assert(ptr) 
 assert(ptr &amp;amp;&amp;amp; intvar) 
 
 etc... 
 
 When porting</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 31 May 2018 15:17:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34934/evaluating-compound-expression-within-assert" /><item><title>RE: Evaluating compound expression within ASSERT()</title><link>https://devzone.nordicsemi.com/thread/134232?ContentTypeID=1</link><pubDate>Thu, 31 May 2018 15:17:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dc93dbb-f4d7-4b04-b883-6f188ec14126</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using SDK 14.2&lt;/p&gt;
&lt;p&gt;Will give it a try.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Evaluating compound expression within ASSERT()</title><link>https://devzone.nordicsemi.com/thread/134222?ContentTypeID=1</link><pubDate>Thu, 31 May 2018 14:47:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:834a42cc-f47b-4e5f-ba27-035c86dccea0</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What SDK version are you using?&lt;/p&gt;
&lt;p&gt;I have not checked how far back this holds, but at least in SDK 15 for the ASSERT macro to have any effect you must add the DEBUG_NRF preprocessor define. See nrf_assert.h. Without DEBUG_NRF or DEBUG_NRF_USER defined it will be an &amp;quot;if (false)&amp;quot;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>