please advice. thanks!
Code: Select all
ixDim=1;
While ( ixDim<=100);
Expand ('%sElName' | numbertostring(ixDim) | '%') = numbertostring(ixDim);
ixDim=ixDim+1;
End;
Code: Select all
ixDim=1;
While ( ixDim<=100);
Expand ('%sElName' | numbertostring(ixDim) | '%') = numbertostring(ixDim);
ixDim=ixDim+1;
End;
This is one of the major limitations IMO of using Expand. I for one would LOVE to be able to use Expand on the LHS of a variable declaration. It would save a lot of tedious lines of prolog code of nothing more than establishing variables for use in processes with dynamic datasources with number of data source variables only known at runtime.pandinus wrote:With EXPAND you:edit:
- can only assign a dynamic value to a variable.
- cannot make the variable name itself dynamic.
In case you really really really would like dynamic variable names including dynamic values you're best of building a temporary cube to hold the information.
I would agree (along with For loops to get rid of the (sometimes forgotten) bloody counter variable in While loops, and increment / decrement operators, a real debug mode, an IDE that is worth a damn and pretty much any other construct that has been available in most mainstream programming languages for the past quarter of a century), but bitter experience has told me how that will go.Wim Gielis wrote:Exactly. This, and also an implementation of the concept of arrays.
Yes, I was aware of that one. I should have chosen my own words more carefully as well so as to include that but it was why I qualified it as a "real" debug mode. I believe (since I have yet to install PAL) that this allows you to view various values as you step though. But (and I'll be quite happy if I'm wrong about this) I don't believe that it allows you to step through AND edit the code AND dynamically assign values within a complete IDE in the style of Eclipse, the Visual Basic Editor, Visual Studio, etc, etc.David Usherwood wrote:@Alan, you will doubtless be delighted to know that for Planning Analytics 2.0, released in December 2016, IBM make available a Java-based debugger tool:
https://developer.ibm.com/recipes/tutor ... -debugger/
I'm choosing my words carefully as I believe that, since it is not part of the main install, it is not fully supported.
I have tried it and it appears to work - although, with Dells with fonts set to other than 100%, the 'password' box does not show, which is something of a showstopper in use.
Correct, it won't do that. Still I found it useful and timesaving the couple of times I used it in day-to-day TM1 (TI) work.Alan Kirk wrote:But (and I'll be quite happy if I'm wrong about this) I don't believe that it allows you to step through AND edit the code AND dynamically assign values within a complete IDE in the style of Eclipse, the Visual Basic Editor, Visual Studio, etc, etc.
I kinda figured it wouldn't...Wim Gielis wrote:Correct, it won't do that. Still I found it useful and timesaving the couple of times I used it in day-to-day TM1 (TI) work.Alan Kirk wrote:But (and I'll be quite happy if I'm wrong about this) I don't believe that it allows you to step through AND edit the code AND dynamically assign values within a complete IDE in the style of Eclipse, the Visual Basic Editor, Visual Studio, etc, etc.
"Ever" ain't over yet...Steve Rowe wrote:Just a few more comments about the debugger, this probably has to be the most side-tracked thread ever?.
Not quite. You can edit TI existing code (unfortunately neither datasource/variable definition, nor new process creation), but not while actively debugging a process. You can also change the values assigned to a variable manually in the UI, but not dynamically via script. While it's certainly not a full fledged IDE, I personally think it covers all the critical bits of functionality.Wim Gielis wrote:Correct, it won't do that. Still I found it useful and timesaving the couple of times I used it in day-to-day TM1 (TI) work.Alan Kirk wrote:But (and I'll be quite happy if I'm wrong about this) I don't believe that it allows you to step through AND edit the code AND dynamically assign values within a complete IDE in the style of Eclipse, the Visual Basic Editor, Visual Studio, etc, etc.
It does not require PAW, and the new (docuemented REST) APIs are only available on PA2.Steve Rowe wrote: 1. Believe it to be a standalone piece of java that doesn't require PAW, I think it has to be a fairly recent TM1 version or the correct API calls don't exist under the hood. I think it works with 10.2.2. (untested). So if you are on maintenance I guess you could download PA and just use the debugger if you aren't ready to take the plunge.