e.g. in a medical context (in UPPER CASE the resulting text):
Does shoulder ache ? No, Yes (radio-button)
[No] -> NO SYMPTOMS ABOUT SHOULDER
[Yes] -> Can rise arm against resistance ? (radio button)
[No] -> STRONG SHOULDER PAIN WITH LOSS OF FUNCTIONALITY.
[Yes] -> SHOULDER PAIN, BUT ABLE TO RISE OBJECTS.
This is only a small example: I'd like to create more complex decisional
tree (e.g. about different body parts)
....
Does already exist a similar descriptive language text-oriented or have
I to create it ?
(I know Delphi and I could learn Python, but I have no much time).
Thanks for any advice!
Simon
_______________________________________________________
Sperm: To be fastest doesn't imply that you are smartest.
( by Enrique Herranz )
Easier to do it like this:
1: Does shoulder ache ?
[No] -> NO SYMPTOMS ABOUT SHOULDER
[Yes] -> [2]
2: Can rise arm against resistance ?
[No] -> STRONG SHOULDER PAIN WITH LOSS OF FUNCTIONALITY.
[Yes] -> SHOULDER PAIN, BUT ABLE TO RISE OBJECTS.
In other words, the number is a label, you start with label 1, and if you
have to go to another label you simply add the
- Put this in a textfile, and have a delphi app read it line for line.
- if the line starts with a label, read two extra lines (yes and
no), store them in an object and put them in a tstringlist with the label
as string (iow strl.addobject(labelname,myobject); )
- skip empty lines.
The GUI will like this: Have a combo box, or a few buttons. As said we
assume label 1 is the start, do a ind:=strl.indexof('1') and get the
corresponding object (myobj:=TMyObjecType(strl.objects[ind]); ).
Now update the gui with the data in the classe. When a user selects something with an end
choice, simply show the text, otherwise determine the number of the next
label, and do the next iteration.
Should be doable in an hour or so.
>Easier to do it like this:
What a elegant method (and seems born to be done also in Python)!
Well, I had to read it 4-5 times to understand it fully.... :-)
(I couldn't do it this way by myself, thanks!)
No elegant method deserves the humiliation to be done in Python :_)