<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to ANY type when integer has a subrange</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/67578c9a7d/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/67578c9a7d/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/67578c9a7d/</id><updated>2022-02-24T05:52:57.583000Z</updated><subtitle>Recent posts to ANY type when integer has a subrange</subtitle><entry><title>ANY type when integer has a subrange</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/67578c9a7d/?limit=25#ab52" rel="alternate"/><published>2022-02-24T05:52:57.583000Z</published><updated>2022-02-24T05:52:57.583000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.com51645c75284ef6dd3acc94b90a4cedbca3fd1248</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It doesn't fix the ANY, but if you need that info you could use __VARINFO which gives you a bit more info.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ANY type when integer has a subrange</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/67578c9a7d/?limit=50#4e20" rel="alternate"/><published>2022-02-23T16:30:18.038000Z</published><updated>2022-02-23T16:30:18.038000Z</updated><author><name>tvm</name><uri>https://forge.codesys.com/u/tvm/</uri></author><id>https://forge.codesys.comb60c3317122c6453c7ec432062cd65603e49d303</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have a function with an input of ANY type.  I have discovered that if an integer type has a subrange, for example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;    Var1:     INT(1..50);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;then the TypeClass of the ANY variable becomes TYPE_SUBRANGE, instead of its base type.  The problem is that it is not possible to determine what type the variable is.  I can guess whether it's 8,16,32,or 64 bits, but there's not way to tell if it's signed or unsigned.&lt;/p&gt;
&lt;p&gt;Has anyone else run into this?  Why would it be designed this way?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>