WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Called WBTs and WBCs

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2001:01:05:14:43:52
Last Updated: 2001:01:05:14:43:52