variables not initialized

Discussion of issues related specifically to writing code for native mode devices. This includes ZBasic code as well as assembly language code and C code, both inline and standalone.
Post Reply
wwwoholic
Posts: 53
Joined: 23 December 2010, 20:58 PM

variables not initialized

Post by wwwoholic »

I think there is a problem in new compiler. Long time ago I made a mistake in a program. Not even a bug, simply forgot "const", but since I never assigned anything to that it worked just fine. After using new compiler program started behaving erratically. Here is what I found in zbTempDir

source:
public ThrottleReverse as boolean = true

compiled with 4.0.2:
uint8_t zv_ThrottleReverse = ZB_TRUE;

compiled with 4.1.5:
uint8_t zv_ThrottleReverse;
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: variables not initialized

Post by dkinzer »

wwwoholic wrote:I think there is a problem in new compiler.
Thanks for reporting this. The source of the problem has been found and a solution identified. We will post an update after testing is completed.
- Don Kinzer
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

A new version of the compiler, v4.1.7, with the correction is available on the Downloads page.
- Don Kinzer
Post Reply