reporter issue

4 views
Skip to first unread message

Andreas Duering

unread,
Dec 1, 2012, 8:17:56 AM12/1/12
to modell...@googlegroups.com
Dear all,

I just wanted to report more than one ore two condition for input boxes.

It is the " mortality as histogram reporter " in the interface of this model http://m.modelling4all.org/m/?frozen=dLK0SKw4-N8L56Mh2HTo5b&MforAllModel=1 .
If I enter one condition it is if condition [1], with two it is ifelse condition [1] [2] but what if I wanted more than 2 conditions?

Probably just a silly question...

All best and thank you for the help
Andreas

Andreas Duering

unread,
Dec 1, 2012, 8:26:30 AM12/1/12
to modell...@googlegroups.com
I have just tried to box the ifelse routines inside each other, just like a matrioschka, so another ifelse in the second [] etc... That does not work :-)

Ken Kahn

unread,
Dec 1, 2012, 8:43:38 AM12/1/12
to modell...@googlegroups.com
Nesting the ifelse inside each other is the solution but it can be tricky to get the square brackets in the right place.

There was a discussion of this in the NetLogo list 4 years ago:


Best,

-ken

--
You received this message because you are subscribed to the Google Groups "The Modelling4All project" group.
To view this discussion on the web visit https://groups.google.com/d/msg/modelling4all/-/qVAa_O25kRkJ.

To post to this group, send email to modell...@googlegroups.com.
To unsubscribe from this group, send email to modelling4al...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/modelling4all?hl=en.

Andreas Duering

unread,
Dec 1, 2012, 9:22:42 AM12/1/12
to modell...@googlegroups.com
Yes, to just stack multiple ifs is much better it also makes for a very well structured and obvious code as the multiple repetitions can now be easily positioned under each other.
Thank you!


2012/12/1 Ken Kahn <toon...@gmail.com>
Nesting the ifelse inside each other is the solution but it can be tricky to get the square brackets in the right place.

There was a discussion of this in the NetLogo list 4 years ago:


Best,

-ken


On 1 December 2012 13:26, Andreas Duering <andreas...@stx.ox.ac.uk> wrote:
--
You received this message because you are subscribed to the Google Groups "The Modelling4All project" group.
To view this discussion on the web visit https://groups.google.com/d/msg/modelling4all/-/qVAa_O25kRkJ.

To post to this group, send email to modell...@googlegroups.com.
To unsubscribe from this group, send email to modelling4al...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/modelling4all?hl=en.
Reply all
Reply to author
Forward
0 new messages