Custom Statement Error

Hello Everybody,

This is a Pan6 question.

I have a custom statement, which has worked flawlessly for years. I decided to make a small change to the code.

The first thing I did was to select menu Wizards-Developer Tools-Custom Statements. In that window, I clicked Statement-New Statement, and named a new statement. I then double-clicked the ORIGINAL statement, copied the entire code, and pasted that code into the new custom statement code window. I then saved, and selected Statements-Register New/Modified Statements.

At that point, I thought, I had two identical custom statements with slightly different names. BUT …

Now, neither custom statement works. When I call the original custom statement, I get an error window “Implicit assignment to current cell has been disabled!” I don’t know what is the “current cell” the message refers to. The code does not write to any cell, nor does it refer to any cell.

I inserted a message statement just before the final RTN, and the message window appears. So, the entire custom code runs without an error. But the statement stops at the error window (apparently at the point when it returns to the calling macro) and no longer works. The next statement in the calling macro is a debug command. I’m at my wit’s end as to what’s wrong.

I have a Time machine backup. Is there some file, or folder which I can resurrect to get me back to where I was?

Thanks for any help.

Vic

An implicit assignment is a statement that contains the text to be assigned in quotes, and nothing more. That text is assigned to whichever cell happens to be active at the time. It’s a holdover from Panorama 1. Few people knew the feature existed, and it was more likely to be used unintentionally, than intentionally. By default, this feature is disabled in Panorama 6.

A common way to use this feature unintentionally, was to give a parameter to a statement that didn’t take a parameter. Something like

Paste "some text"

or

CloseFile "MyDB"

That’s why it’s called an “implicit” assignment. Suppose you had a procedure that contained only this text.

"hello"

If you ran this procedure in Panorama 1 thru 5, it would put the word hello into the current cell. In other words, it would assign the value hello to the current cell. Usually an assignment is “explicit” with an = symbol, for example

Greeting = "hello"

Since there is no = symbol in the first example, that is considered an “implicit” assignment. As Dave pointed out, it was very easy to accidentally put an implicit assignment into code without realizing it. There would be no error message, but your code would write over data when you didn’t mean for it to do that. So in Panorama 6, this feature was disabled. Instead of writing over data, it produced an error message. If you really wanted to use this feature, there was a way in Panorama 6 you could re-instate it, but I don’t remember what it was. In Panorama X there is no way to use implicit assignment. Instead, you can get the same effect with this code.

«» = "hello"

Chances are, however, that the implicit assignment in your code is a bug, which you should locate and eliminate.

Hello Dave and Jim,

Thank you for taking the time in your busy schedules to respond to a Pan6 question.

Yes, Jim, I figured I had a code error. But for the life of me I couldn’t spot it. The macro was checked and double checked, and triple checked in an outside database. It always worked correctly.

And then, there it was. The error was NOT in the code, but in the PARAMETER section of the custom window. Somehow, The word “OPTIONAL” got deleted from the fourth parameter. That parameter is sometimes supplied to the statement, sometimes not. That was what was messing things up.

With the “OPTIONAL” word added back, now everything is back to normal.

NEW QUESTION: How do I now delete the temporary custom statements I added while trying to track this error down? There is a menu command to ADD STATEMENT, but no command to delete a statement.

Best regards,
Vic

In the Custom Statements wizard select your library file and then double click the custom statement you want to eliminate. That procedure will then open where you can select Delete Procedure from the Setup menu. Restarting Panorama 6 should now have it eliminated.

If you want to remove the entire custom library file you can go to the Panorama 6 application folder and select Extensions/Libraries and delete that file. A Pan restart will have it removed from the Custom Statements wizard altogether.

Thanks, Gary.

I have all of all of a sudden started getting the implicit … alert. It has started showing up in macros that I have used for decades in Pan6 - that is part of a ticket selling Boxoffice program that has run my movie theater since the 90’s
I can’t make it go away --this is a serious issue

this starte when I had to re-install Pan. 6

You may have previously been using one of the earlier builds of Pan 6.

Read the earlier posts in this thread for a discussion of what an implicit assignment is.

The following is from a QNA message dated Mon, 17 Jan 2011

I have just made a change that will be in the next build of
Panorama 6. From now on, this “implicit assignment” feature is
disabled by default. If you want to turn it back on, follow
these steps:

  1. open the Preferences window

  2. Open Special->Edit Raw Preferences

  3. Add this line

    <ALLOW_AUTO_STUFF>yes</ALLOW_AUTO_STUFF>

  4. Close the dialog, then quit and relaunch Panorama.

However, a better approach would be to change any procedures
that still use this. For example

field “Name”
“John”

should be changed to:

Name=“John”

Jim Rea
President, ProVUE Development

1 Like

thanks for the quick response-- I’m still not getting anywhere
Opened Preferences window --could not find Open Special or Edit Raw Preferences i.e. don’t know where to paste the <ALLOW_AUTO_STUFF>yes</ALLOW_AUTO_STUFF>
instruction. I get the alert whenever I click on the number of tix to print.
This clearly isn’t a job for a 76 year old with NO programing knowledge.
Appreciate any & all help

Special is a menu, located just to the right of the File menu, when the Preferences are open.

When you choose Edit Raw Preferences…, you will get this dialog.

You can paste that line anywhere in that dialog.

FIXED !!! Can’t thank-you enough.