Unused Variable

Discussions related to Visual Prolog
Post Reply
Martin Meyer
VIP Member
Posts: 241
Joined: 14 Nov 2002 0:01

Unused Variable

Unread post by Martin Meyer » 22 Apr 2013 16:59

Hi Thomas,

I made two observations (neither of them but being important) about this predicate:

Code: Select all

predicates     test : (boolean Flag). clauses     test(Flag):-         if Flag = true then             A = 1,             stdIo::write("we don't use A in this branch")         else             A = 0,             stdIo::write(A)         end if.
1st is, that the compiler does not give a warning regarding an unused variable or excessive code.

2nd is, that when setting a breakpoint on line stdIo::write(A) and calling the predicate by test(false), then the value of A is displayed in "Variables in the Current Clause" as 1 at this line, nevertheless it correctly writes 0 to the Messages window.

Regards,
Martin

User avatar
Thomas Linder Puls
VIP Member
Posts: 2361
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 23 Apr 2013 11:00

Thank you. We will look at these matters.
Regards Thomas Linder Puls
PDC

User avatar
Thomas Linder Puls
VIP Member
Posts: 2361
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 4 Jun 2013 7:52

This is fixed in Build 7402. IDE: Web -> Check for updates...
Regards Thomas Linder Puls
PDC

Post Reply