COB interpreter oddity

COB interpreter oddity

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

COB interpreter oddity

Post by imbaczek »

Code: Select all

			case BITWISE_NOT:
				r1 = POP();
				stack.push_back(!r1);
				break;
shouldn't this be

Code: Select all

				stack.push_back(~r1);
?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Seems so yeah.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

committed.
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Post by Archangel of Death »

Just out of fatigue-induced curiosity, what exactly did that error do, if anything that a user or scriptor would notice?
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Post by tombom »

Archangel of Death wrote:Just out of fatigue-induced curiosity, what exactly did that error do, if anything that a user or scriptor would notice?
The bitwise not operation in COB was actually doing a boolean not as far as I can tell.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

a more dramatic example: ~1 was 0 before, and now should be -2.
Post Reply

Return to “Engine”