If you’re testing with MDI commands, either a local or global variable would work. If you have a subroutine where you’re setting the value and then writing an MDI command to print the value, then it would have to be a global variable because a local variable would go out of scope.
What is the code that isn’t reliably working? In your example, it’s only the (debug,) statements that aren’t behaving how you expect. The debug command knows how to replace variable names, but doesn’t know how to evaluate an expression. Assign the expression to a variable and then print that variable and it will do what you want. If your variable goes out of scope, though, before printing it then it won’t show anything in the variable. > On Mar 3, 2024, at 4:56 PM, gene heskett <ghesk...@shentel.net> wrote: > > On 3/3/24 17:33, John Allwine wrote: >> Store it in another variable first: >> #<myvar> = #[200+#50] >> ;debug,#<myvar> > > That is what I am trying to do, prolly 20+ times in my present code but > regardless #<myvar> contains all balls. and its global here, 3 other > machines including the rpi4b running my Sheldon are also behaving > identically. Works fine on the left of the = sign does something else when > its on the right side of the = sign. > > I did get it to work but probably after a dozen tries. Dependably? TBD. And > I'm frazzled for this day. So I'll give it a try tom. Thanks John, take care > & stay well. > > ?? Does the local/global status of the var make a diff? I note you used a > local in your example above. > > Thanks a bunch. > [...] > Cheers, Gene Heskett, CET. > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author, 1940) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > > > > _______________________________________________ > Emc-developers mailing list > Emc-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-developers _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers