[comp.windows.ms] Any Knowledge-Pro Programmers out there?

steveo@dbrmelb.dbrhi.oz (Stephen Oakes) (08/22/90)

I am working on a rather large project, which is basically being programmed
in Knowledge-Pro (Windows).  I have come across several occasions where I
would like to be able to (abnormally) exit from a particular procedure
("topic" in KPwin terminology).

Basically I require something like:

	do(x).

	topic x.
	    if ?a then  { etc } (* Or anything which involves evaluating a *)
	end. (* x *)

	topic a.
		if {special condition}
		then {terminate(x) (or terminate(calling_topic())) }
		else {etc, give "a" a value}
	end. (* a *)

KP provides the function "exit", but only to exit from the current topic.  I
need to be able to exit from the topic which called the current topic (also
terminating the current topic, of course.)

Anyone have any ideas, tricks, fudges??

(PS.  Is this the correct newsgrope for such a question??)

THANKS FOR ANY REPLIES,
			Stephen Oakes.

patrickd@chinet.chi.il.us (Patrick Deupree) (08/23/90)

In article <865@dbrmelb.dbrhi.oz> steveo@dbrmelb.dbrhi.oz (Stephen Oakes) writes:
>KP provides the function "exit", but only to exit from the current topic.  I
>need to be able to exit from the topic which called the current topic (also
>terminating the current topic, of course.)
>
>Anyone have any ideas, tricks, fudges??
>
>(PS.  Is this the correct newsgrope for such a question??)

It's probably as correct a newsgroup as you'll find, but I've not seen many
KPWIN users on here, so I'm not sure how much response you'll get.  Assuming
that KPWIN works like any normal "language", though, I think you might have
to return a value from your topic and have the calling topic check to see
if the topic it called exits abnormally (e.g. return some flag such as false
and this will tell the calling topic to exit also).
-- 
"Organized fandom is composed of a bunch of nitpickers with a thing for
 trivial pursuit."  -Harlan Ellison

Patrick Deupree ->	patrickd@chinet.chi.il.us