Div and Mod with Variables
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Div and Mod with Variables
That is the ending to the overall node. Therefore, I think that it does not seem to end with the last node, but stops after finding an error possibly?
Re: Div and Mod with Variables
Well, it seems that the issue is with that last (#369) node. If you add the line:
the handler completes without issue.
So it is not a LC issue, I think, per se. It will be interesting to see if anyone can figure out why that last node breaks the otherwise even flow of data and processing.
Oh, and don't give up on "div". With its counterpart, "mod", you can do so much.
Craig
Code: Select all
if x = 369 then exit repeat
So it is not a LC issue, I think, per se. It will be interesting to see if anyone can figure out why that last node breaks the otherwise even flow of data and processing.
Oh, and don't give up on "div". With its counterpart, "mod", you can do so much.
Craig
Re: Div and Mod with Variables
the list items follow in numerical order the ID's of each animal.
Last legal output from set has ID of 31520691, which is the last and largest number in the data set.
ID: 31520691
Species: Dog
Sex: Female
Breed: Chihuahua, Short Coat / Mix
Age: 0 years 6 months
animal 373
The next ID gives an error: "ID: xmlerr, can't find element"
Species, Sex, Breed, Age all fail as the ID value contains a non numerical value.
This might be relevant::
The number of nodes is 369 according to Livecodes revXMLChildNames() function, but <xmlnode> occurs only 341 times in the .XML file, so I'm assuming there are only 341 animals in the dataset.
I added a counter to the output...--it adds up to 373 animals before the error occurs.
If someone explains this to me I will be grateful

Paul
Re: Div and Mod with Variables
Yes I understand there is still an error, which I believe has to do with the last node which looks like this "<XmlNode xsi:nil="true"/>".
Using the "if" does solve the main problem though so that may be the best solution so far.
On the number of nodes:
There are 373 nodes and 373 animals. I am not sure where you are getting these other numbers, but in the xml there are 746 total "XmlNode" (which is divided by 2 as the node has a closing and ending bracket).
Using the "if" does solve the main problem though so that may be the best solution so far.
On the number of nodes:
There are 373 nodes and 373 animals. I am not sure where you are getting these other numbers, but in the xml there are 746 total "XmlNode" (which is divided by 2 as the node has a closing and ending bracket).