richard
20th December 2011, 18:11
Hello,
How do you write the command stop if in debug with literals:
For example stop if a.sitm="10360878"
I get always error of syntax.
Thank you
bdittmar
20th December 2011, 19:28
Hello,
How do you write the command stop if in debug with literals:
For example stop if a.sitm="10360878"
I get always error of syntax.
Thank you
Hello,
help or ? will show the debugger commands.
Workaround:
t a.sitm (Trace the variable)
Regards
richard
21st December 2011, 09:16
Hello,
I know about the help in debug.
My stop if works when I test a numeric, but I don't find the syntax for literals.
JaapJD
21st December 2011, 09:30
Can you make a screenshot of the exact error message in the debugger?
bdittmar
21st December 2011, 09:47
Hello,
How do you write the command stop if in debug with literals:
For example stop if a.sitm="10360878"
I get always error of syntax.
Thank you
Hello,
reason maybe trailing spaces !
TRY:
stop if a.sitm(1;8) = "10360878"
Regards
JaapJD
21st December 2011, 10:00
Trailing spaces can be present, indeed. But then the debugger will only not stop, because the condition is not met. If will not raise a syntax error because of that.
bdittmar
21st December 2011, 10:23
Trailing spaces can be present, indeed. But then the debugger will only not stop, because the condition is not met. If will not raise a syntax error because of that.
Hello JaapJD,
you're right about the "syntax error", i think Richard has to give more details about his problem.
That means, if a Syntax error is shown in debugger, he should post 'em.
If only debugger doesn't hit the condition, the trailing (leading) spaces should be considered.
Hope, Richard will give us a hint.
Regards
Hitesh Shah
21st December 2011, 16:43
I dont recollect with any problem with string literals in debug . Probably the symbol/variable is not extern declared .
But u can always workaround using IN operator also .
stop if a.item IN "123456789.*" .
Note- all expressions and functions used in expr.complie help can be used in compiler as debugger uses expr.compile functions only to evaluate these conditions.
richard
22nd December 2011, 08:38
Unknown symbol 'a.sitm' in expression: value 0 assumes
Incompatible types in expression with operator '=='
With stop if on a field of type long, I don't have any problem.
Thanks
JaapJD
22nd December 2011, 08:50
Probably a.sitm is a local variable in a function. The debugger cannot evaluate the stop in expression outside that function, because the variable is not known there.
mark_h
22nd December 2011, 14:49
Sounds more like an alias in the query. Post a copy of the code and the error message. I do not believe you can trace an alias. I think if you did something like a.sitm:sitm.trace, declare sitm.trace and then you could track it.
Hitesh Shah
22nd December 2011, 16:57
Is variable a.sitm declared like following
extern domain tcitem a.sitm
Extern declaration should resolve the error.
thieuf
29th December 2011, 12:59
just an quick and dirty option ...
you could put an if statement in the script with a counter update and trace the counter....
something like:
if a.sitm >= "123456" then
counter = counter + 1
endif
reagrds ...
richard
29th December 2011, 18:15
Hello,
I put my string in a numeric, the if sentence with a numeric is working.
My request was just to know how we should write the stop if sentence in case of a string variable.