<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: If statements in JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2037#M2037</link>
    <description>Wow, that's awesome, thanks!  (sorry for hijacking this thread).</description>
    <pubDate>Fri, 02 Jul 2010 17:55:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-07-02T17:55:33Z</dc:date>
    <item>
      <title>If statements in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2031#M2031</link>
      <description>Is it possible to execute multiple statements from one if condition - like an if/then/do statement in SAS?  How can it be done?</description>
      <pubDate>Sun, 11 Jun 2023 12:04:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2031#M2031</guid>
      <dc:creator />
      <dc:date>2023-06-11T12:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: If statements in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2032#M2032</link>
      <description>&lt;P&gt;You bet. It's odd in JSL, but semicolons are subordinate to commas. So you can have statements in an if statement separated by semicolons.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If(,&amp;lt;statements separated by semicolons&amp;gt;).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 14:54:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2032#M2032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-04T14:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: If statements in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2033#M2033</link>
      <description>JSL gives the appearance of a regular language with statements terminated by a semicolon.  It is however, very much a function driven language, where you make function calls with lists of arguments separated by commas.  Standard programming constructions such as loops and if statements are implemented as functions.  The IF function can take multiple arguments, which act in condition expression-pairs:&lt;BR /&gt;&lt;BR /&gt;If ( condition1, expression1, condition2, expression2, ..., final-expression )&lt;BR /&gt;&lt;BR /&gt;Thus giving the structure of an if--elseif-else statement.&lt;BR /&gt;&lt;BR /&gt;Each expression can consist of multiple lines of code delineated with a semicolon.&lt;BR /&gt;&lt;BR /&gt;In fact, the semicolon is just an operator that implements the Glue function.  Glue takes a list of JSL expressions separated by commas,&lt;BR /&gt;&lt;BR /&gt;so for example: &lt;BR /&gt;&lt;BR /&gt;a=1;&lt;BR /&gt;b=2;&lt;BR /&gt;c=a+b; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;is just short-hand for &lt;BR /&gt;&lt;BR /&gt;Glue(a=1,b=2,c=a+b)&lt;BR /&gt;&lt;BR /&gt;All the JSL functions are listed with descriptions in the JSL Functions Index under Help&amp;gt;Indexes</description>
      <pubDate>Thu, 01 Jul 2010 22:41:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2033#M2033</guid>
      <dc:creator />
      <dc:date>2010-07-01T22:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: If statements in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2034#M2034</link>
      <description>&lt;P&gt;The IF statement in JSL takes a little getting used to. For readability I use comments that mark the "THEN" and "ELSE" sections.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 14:56:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2034#M2034</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2017-01-04T14:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: If statements in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2035#M2035</link>
      <description>These boards take HTML?????&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 14pt; font-family: &amp;quot;Courier New&amp;quot;; color: red;"&gt;Wahoo!!!&lt;/SPAN&gt;</description>
      <pubDate>Fri, 02 Jul 2010 15:29:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2035#M2035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-02T15:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: If statements in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2036#M2036</link>
      <description>I put a very brief description of how to post formatted code in this posting:&lt;BR /&gt;&lt;BR /&gt;http://support.sas.com/forums/message.jspa?messageID=38882#38882&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Peter</description>
      <pubDate>Fri, 02 Jul 2010 17:49:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2036#M2036</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2010-07-02T17:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: If statements in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2037#M2037</link>
      <description>Wow, that's awesome, thanks!  (sorry for hijacking this thread).</description>
      <pubDate>Fri, 02 Jul 2010 17:55:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/2037#M2037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-02T17:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: If statements in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/35292#M20822</link>
      <description>&lt;P&gt;All actions need to be separated by semicolon and then grouped using parenthesis.&lt;/P&gt;&lt;P&gt;The following example worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A=1;&lt;/P&gt;&lt;P&gt;if&lt;STRONG&gt;(&lt;/STRONG&gt;A==1, &lt;STRONG&gt;(&lt;/STRONG&gt;x=A*1; y=A*2;z=A*3&lt;STRONG&gt;)&lt;/STRONG&gt;, &lt;STRONG&gt;(&lt;/STRONG&gt;x=A^1; y=A^2;z=A^3&lt;STRONG&gt;))&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;Print&lt;STRONG&gt;(&lt;/STRONG&gt;x&lt;STRONG&gt;)&lt;/STRONG&gt;; Print&lt;STRONG&gt;(&lt;/STRONG&gt;y&lt;STRONG&gt;)&lt;/STRONG&gt;; Print&lt;STRONG&gt;(&lt;/STRONG&gt;z&lt;STRONG&gt;)&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;/*:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;//:*/&lt;/P&gt;&lt;P&gt;A=2;&lt;/P&gt;&lt;P&gt;if&lt;STRONG&gt;(&lt;/STRONG&gt;A==1, &lt;STRONG&gt;(&lt;/STRONG&gt;x=A*1; y=A*2;z=A*3&lt;STRONG&gt;)&lt;/STRONG&gt;, &lt;STRONG&gt;(&lt;/STRONG&gt;x=A^1; y=A^2;z=A^3&lt;STRONG&gt;))&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;Print&lt;STRONG&gt;(&lt;/STRONG&gt;x&lt;STRONG&gt;)&lt;/STRONG&gt;; Print&lt;STRONG&gt;(&lt;/STRONG&gt;y&lt;STRONG&gt;)&lt;/STRONG&gt;; Print&lt;STRONG&gt;(&lt;/STRONG&gt;z&lt;STRONG&gt;)&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 20:12:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statements-in-JSL/m-p/35292#M20822</guid>
      <dc:creator>Badri</dc:creator>
      <dc:date>2017-02-03T20:12:01Z</dc:date>
    </item>
  </channel>
</rss>

