Page 1 of 1

Routine - Transform Function bug - missing Return(Ans)

Posted: Mon Apr 21, 2008 3:53 am
by chrisponty
This is not a major problem, but an annoying bug which I cannot seem to
fix, without creating a new routine, and rebuilding from scratch.

I am writing a routine to calculate NCD's, which will be called by the transform function.

While writing this routine, I save then compile and then test the routine, but at some point, the Return(Ans) has disappeared from the bar towards the bottom of the code tab in the routine.

Even the code Ans = NCD has gone. I re-insert and compile, but the routine will no longer run and provide a result!!

A) has anyone else had this problem in server on 7.1
B) Does anyone know how to get the Return(Ans) back in the bar

to save me having to create a new routine each time this bug occurs (4x now since starting of the rouhtine!).


thanks for your help.

Re: Routine - Transform Function bug - missing Return(Ans)

Posted: Mon Apr 21, 2008 4:36 am
by sachin1
are you creating "BEFORE/AFTER subroutine" or transform function.

Re: Routine - Transform Function bug - missing Return(Ans)

Posted: Mon Apr 21, 2008 4:45 am
by chrisponty
Its a transform function.

Posted: Mon Apr 21, 2008 4:49 am
by ray.wurlod
Never seen that behaviour in any release. Can you try adding a comment after the final executable line? Also check that you don't have too many End statements in the code.

Posted: Mon Apr 21, 2008 5:16 am
by chrisponty
Ray,

added comment, didnt cause the compile to fail, also number of ends matches the number of Ifs.

got a new version of the routine to compile and work, so not a problem,
but an annoying glitch when it occurs.

Posted: Mon Apr 21, 2008 4:41 pm
by ray.wurlod
Silly thing is, the source code is saved as a single string, so there's no sensible way it can lose a line or two. (The insensible way, of course, is bad coding of the client/server interface, but we don't have access to the source code for that. It would be sensible to report this through your support provider, particularly if you have a reproducible example.)

Posted: Tue Apr 22, 2008 2:35 am
by chrisponty
Cheers for the help Ray, will email support with the problem.

Will let you know if they can resolve this issue.

cheers

Re: Routine - Transform Function bug - missing Return(Ans)

Posted: Tue Nov 04, 2008 4:53 pm
by TD_Chile
chrisponty wrote:This is not a major problem, but an annoying bug which I cannot seem to
fix, without creating a new routine, and rebuilding from scratch.

I am writing a routine to calculate NCD's, which will be called by the transform function.

While writing this routine, I save then compile and then test the routine, but at some point, the Return(Ans) has disappeared from the bar towards the bottom of the code tab in the routine.

Even the code Ans = NCD has gone. I re-insert and compile, but the routine will no longer run and provide a result!!

A) has anyone else had this problem in server on 7.1
B) Does anyone know how to get the Return(Ans) back in the bar

to save me having to create a new routine each time this bug occurs (4x now since starting of the rouhtine!).


thanks for your help.
This works for me

1) Export routine in dsx format
2) Open it with notepad
3) Find strange characters like /a /b etc etc
4) Remove those characters
5) Save dsx file
6) re-import the routine
7) a little pray
8) voila !

CAUSE: typically the copy/paste human need, from another text processors to Ds editor

Bye.