Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Distinguish between WBTs and WBCs

Keywords:   Distinguish between WBTs and WBCs	rtstatus()

Question:

RE: Easily switching between WBT, EXE and WBC Files

Is there a simple way to do this conversion? I have a program called main.wbt which calls (via both Run and Call statements) other winbatch files. Does anyone know of an easy way to keep this in sync with a compiled version? Basically, there's a test area and a production area. The production area is compiled, and the test area is not. When moving from test to production, we compile, but then all of the Run and Call statements are wrong. Any ideas?

Answer:

a=rtstatus()
Message("RTStatus Returns",a)

0 = interpreted 1=compiled 10=Winbatch Studio Debug
So what I do is:
	a=rtstatus()
	if a==1 
		wbext="wbc"
	else 
		wbext="wbt"
	endif
then I:
	call("sumglywump.%wbext%","")
in the interpreted versions it will get sumglwump.wbt and in the compiled versions it will get sumglywump.wbc.
Article ID:   W12782
Filename:   Distinguish between WBTs and WBCs.txt