<?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: Verificar se o valor de uma variável é do tipo INTEIRO in Forum em português</title>
    <link>https://communities.sas.com/t5/Forum-em-portugu%C3%AAs/Verificar-se-o-valor-de-uma-vari%C3%A1vel-%C3%A9-do-tipo-INTEIRO/m-p/776526#M720</link>
    <description>&lt;P&gt;Olá.&lt;BR /&gt;&lt;BR /&gt;Creio que pode usar a função INT:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;data RxJunior;&lt;BR /&gt;input valor;&lt;/P&gt;
&lt;P&gt;if valor ^= int(valor) then Verifica='não inteiro'; *&amp;lt;---Verificando (sim ou ao);&lt;BR /&gt;else verifica='interiro';&lt;/P&gt;
&lt;P&gt;valor_int=int(valor); *&amp;lt;--- convertendo;&lt;/P&gt;
&lt;P&gt;cards;&lt;BR /&gt;100&lt;BR /&gt;101.10&lt;BR /&gt;102&lt;BR /&gt;105.86&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Retirei a ideia de uma resposta das communities:&lt;BR /&gt;&lt;BR /&gt;General SAS Programming&lt;BR /&gt;SAS Function to check whether the field value is decimal or numeric&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/td-p/201682" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/td-p/201682&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;A documentação da função INT é a seguinte:&lt;BR /&gt;&lt;BR /&gt;INT Function&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1b1zd0wuyufp0n1jbqlr27p4eay.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1b1zd0wuyufp0n1jbqlr27p4eay.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Mas, caso queira seguir o raciocínio de resto de divisão, também há a função MOD no SAS:&lt;BR /&gt;&lt;BR /&gt;data test; set RxJunior;&lt;BR /&gt;if mod(valor, 1)^=0 then verifica2='não inteiro';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Espero que isso já lhe ajude.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Oct 2021 15:14:47 GMT</pubDate>
    <dc:creator>cepmiranda</dc:creator>
    <dc:date>2021-10-26T15:14:47Z</dc:date>
    <item>
      <title>Verificar se o valor de uma variável é do tipo INTEIRO</title>
      <link>https://communities.sas.com/t5/Forum-em-portugu%C3%AAs/Verificar-se-o-valor-de-uma-vari%C3%A1vel-%C3%A9-do-tipo-INTEIRO/m-p/776300#M719</link>
      <description>&lt;P&gt;Boa Tarde Pessoal!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Estou precisando validar se o valor contido em determinada variável é do tipo inteiro, no Python, eu utilizo a operação com módulo (%), contudo, no SAS não rodou, alguém têm alguma dica?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 21:23:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Forum-em-portugu%C3%AAs/Verificar-se-o-valor-de-uma-vari%C3%A1vel-%C3%A9-do-tipo-INTEIRO/m-p/776300#M719</guid>
      <dc:creator>RxJunior</dc:creator>
      <dc:date>2021-10-25T21:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Verificar se o valor de uma variável é do tipo INTEIRO</title>
      <link>https://communities.sas.com/t5/Forum-em-portugu%C3%AAs/Verificar-se-o-valor-de-uma-vari%C3%A1vel-%C3%A9-do-tipo-INTEIRO/m-p/776526#M720</link>
      <description>&lt;P&gt;Olá.&lt;BR /&gt;&lt;BR /&gt;Creio que pode usar a função INT:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;data RxJunior;&lt;BR /&gt;input valor;&lt;/P&gt;
&lt;P&gt;if valor ^= int(valor) then Verifica='não inteiro'; *&amp;lt;---Verificando (sim ou ao);&lt;BR /&gt;else verifica='interiro';&lt;/P&gt;
&lt;P&gt;valor_int=int(valor); *&amp;lt;--- convertendo;&lt;/P&gt;
&lt;P&gt;cards;&lt;BR /&gt;100&lt;BR /&gt;101.10&lt;BR /&gt;102&lt;BR /&gt;105.86&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Retirei a ideia de uma resposta das communities:&lt;BR /&gt;&lt;BR /&gt;General SAS Programming&lt;BR /&gt;SAS Function to check whether the field value is decimal or numeric&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/td-p/201682" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/SAS-Function-to-check-whether-the-field-value-is-decimal-or/td-p/201682&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;A documentação da função INT é a seguinte:&lt;BR /&gt;&lt;BR /&gt;INT Function&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1b1zd0wuyufp0n1jbqlr27p4eay.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1b1zd0wuyufp0n1jbqlr27p4eay.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Mas, caso queira seguir o raciocínio de resto de divisão, também há a função MOD no SAS:&lt;BR /&gt;&lt;BR /&gt;data test; set RxJunior;&lt;BR /&gt;if mod(valor, 1)^=0 then verifica2='não inteiro';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Espero que isso já lhe ajude.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 15:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Forum-em-portugu%C3%AAs/Verificar-se-o-valor-de-uma-vari%C3%A1vel-%C3%A9-do-tipo-INTEIRO/m-p/776526#M720</guid>
      <dc:creator>cepmiranda</dc:creator>
      <dc:date>2021-10-26T15:14:47Z</dc:date>
    </item>
  </channel>
</rss>

