TimeLine, Time Change from Module (getting a warning)
Raphayo
Junior Member
Hi All,
I'm trying to do a timeline long time change in a module
if(find_string(data.text,'POLL',1))
{
remove_string(data.text,',',1)
lTL_Polling_Times[1]=atol(data.text)
}
can someone point me why how to solved this warning error.
WARNING: : C10571: Converting type [SINTEGER] to [LONG]
thanks
I'm trying to do a timeline long time change in a module
if(find_string(data.text,'POLL',1))
{
remove_string(data.text,',',1)
lTL_Polling_Times[1]=atol(data.text)
}
can someone point me why how to solved this warning error.
WARNING: : C10571: Converting type [SINTEGER] to [LONG]
thanks
Comments
-
I'm guessing your ITL_Polling_Times is an Signed Integer array, not a long... If you're getting the results you want, simply put the ATOL expression in a TYPE_CAST() to remove the compiler warning.
-
The return from ATOI() is a SLONG. you'll need to do an ABS_VALUE() to make the warning go away
so -
lTL_Polling_Times[1]=abs_value(atol(data.text) ) -
It sounds like your ITL_Polling_Times is defined as a LONG. To eliminate the warning, use this:
ITL_Polling_Times[1] = Type_Cast(atol(data.text));
This will work fine as long as you can be sure that data.text never contains a negative number. You could add a test for this before assigning the value to your variable.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums