"Debug" prints different values for the same variable

Just starting out? Need help? Post your questions and find answers here.
Lebostein
Addict
Addict
Posts: 807
Joined: Fri Jun 11, 2004 7:07 am

"Debug" prints different values for the same variable

Post by Lebostein »

I have no idea what is wrong:

Code: Select all

Structure tm
  tm_sec.l
  tm_min.l
  tm_hour.l
  tm_mday.l
  tm_mon.l
  tm_year.l
  tm_wday.l
  tm_yday.l
  tm_isdst.l
EndStructure

ImportC ""
   time(*tm)
   gmtime(*timep)
EndImport

UTC = time(0)
Debug FormatDate("%hh:%ii:%ss", UTC)
*time.tm = gmtime(@UTC)
Debug *time\tm_hour ; 1. call (seems OK)
Debug *time\tm_hour ; 2. call (different and wrong value)