Page 1 of 4

Guess it's a bug

Posted: Fri Jun 02, 2006 12:51 am
by kellewic
The following code actually works:

Code: Select all

	x:Set[0]
	while (${x:Inc} <= ${${poleSet}.Keys})
	{
		poles:Set[${${poleSet}.Key[${x}}]}, ${x}]
	}

Here are the variable defs:

variable collection:int poles
variable string poleSet = SettingXML[${xmlSettingsFile}].Set["Fishing Poles"]
variable byte x = 0

The reason I think this shouldn't work is there is an errant '}' in the poles:Set[] call.... Key[${x}}]

Shouldn't this be a syntax error? If not, why not?

Posted: Fri Jun 02, 2006 11:15 am
by Lax
Nope, because you're creating a new key that has a } at the end of it...

e.g.

Code: Select all

poles:Set[Apple}, 1]
} is perfectly valid to use

Posted: Fri Jun 02, 2006 8:00 pm
by kellewic
Lax wrote:Nope, because you're creating a new key that has a } at the end of it...

e.g.

Code: Select all

poles:Set[Apple}, 1]
} is perfectly valid to use

That's the thing though... the '}' doesn't appear in the output when I iterate back over the collection. It's like it is ignored. I will re-verify this tonight though and post the code/

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 7:35 pm
by xyilla

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 7:37 pm
by xyilla

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 8:14 pm
by xyilla

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 8:15 pm
by xyilla

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 8:16 pm
by xyilla

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 8:17 pm
by xyilla

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 8:18 pm
by xyilla

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 8:19 pm
by xyilla

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 8:21 pm
by xyilla

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 8:22 pm
by xyilla

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 8:23 pm
by xyilla

Re: Guess it's a bug

Posted: Sun Jul 13, 2025 8:24 pm
by xyilla