#1 2014-11-27 01:36

Snyckerbar
Member
Registered: 2014-11-27
Posts: 4

Question about recurring error message

To den4b, the author of ReNamer:

This is absolutely, hands down the BEST renaming program out there. Thank you for dedicating so much of your time to working through the bugs and making it both powerful and flexible. Although I was saddened to discover that there is now a fee for the fully functional program, you absolutely deserve to be paid for your work. Bravo!

I'm getting into coding for Pascal, and I was curious: Are there limits on the size of variable arrays in this program? If not, are there limits to the number of lines of code a user can write? I write a little C++, and since I know that writing code/compiling isn't the primary function of The ReNamer, I figured it would be prudent to ask first.

I searched the forums and the help guide for this answer, and I didn't find this particular question. Thank you for your time!

-Snyckerbar

Offline

#2 2014-11-27 11:32

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Question about recurring error message

Hi Snyckerbar,

There are no specific limits on the number or size of variables, not the size of the code, except of course hardware memory constraints.

Are you talking about Pascal Script rule in ReNamer or Pascal programming in general? What kind of problems are you encountering?

Pascal Script is an interpreted scripting language that runs within already compiled application, it may have it's own constraints and some time even bugs. If you provide more details or a reproducible problem then we can get it addressed by the original component developer.

Offline

#3 2014-11-27 20:26

Snyckerbar
Member
Registered: 2014-11-27
Posts: 4

Re: Question about recurring error message

Thanks for the reply!

I tried entering some code into the Pascal Script rule in the most recent version of ReNamer, and while it works for a while, there's a point where the compiler gives me a "Pascal Script Compile: [Line 0]: Error: Variable Expected." This error seems to show up at random, and I cannot trace it to any other line in my coding. My code begins:

Const                                                     //This is the very first line of code in my program
   Root = 'C:\Users\User1\Desktop\';    
   Filetrgt = Root + 'Collection1.txt';      //Text file with information
   Alphatrgt  = Root + 'Collection2.txt';  //Text file with information
   Serialtrgt = Root + 'SNumber.txt';      //Text file with numeric information
//------------
//------------
Var
   Strn: array [0..5] of array [0..2000] of Widestring;
   Booln: array [0..5] of array [0..2000] of Boolean;
   Intgr: array [0..2000] of Integer;
   Undefnd: array [0..5] of TStringsArray;
//------------
//------------

// (remainder of code begins here)

If nothing looks wrong with what I posted, then I'll go back and trace the remainder of my code line by line once again- there is a possibility I overlooked something else, but if I did, I can't figure out why the compiler is telling me to look at line 0 instead of the line containing the actual mistake. Thanks again for your time!

-Snyckerbar

Offline

#4 2014-11-28 00:04

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Question about recurring error message

Did your code behave differently in older versions of ReNamer? Does this occur only in ReNamer 6.x?

If it is indeed a bug in Pascal Script then we need a reproducible error, which we can then convey to developers of Pascal Script.

That part of code looks fine, however, one thing I would suggest trying is eliminating use of 2-dimensional arrays, just to see if they are causing the issue.

For example, instead of using:

array [0..5] of array [0..2000] of Widestring

try using:

array [0..10000] of Widestring

Offline

#5 2014-11-28 04:06

Snyckerbar
Member
Registered: 2014-11-27
Posts: 4

Re: Question about recurring error message

That's a good point about the two dimensional arrays possibly being an issue- I'll try smaller one dimensional arrays and see if the problem goes away. If not, I'll come back and post the actual code. Thanks, and enjoy the rest of your holiday!

-Snyckerbar

Offline

#6 2014-12-13 04:37

Snyckerbar
Member
Registered: 2014-11-27
Posts: 4

Re: Question about recurring error message

Update:

Code is completely functional, and you were right- for some reason, ReNamer does not like large multidimensional arrays. If a person is programming in Pascal and wants to use the array function to declare a variable, they will need to stick with one dimensional arrays. This is still the best program I've used in a long while.

One more thing: Is there a way to deactivate the sound during a rename? Thanks again!

-Snyckerbar

Offline

#7 2014-12-15 21:18

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Question about recurring error message

Snyckerbar,

I've done some testing using multidimensional arrays and cannot reproduce any weird behavior that you are experiencing. I'm not ruling out that there could be a bug in PascalScript component, however, so far it is as likely as having the bug in your code, which you could have potentially fixed after rewriting the code.

Just for clarification, Pascal language and PascalScript scripting engine are quite different things. Pascal language has no problems with large multidimensional structures. But PascalScript engine could potentially have a problem, but there is no way of knowing for sure unless you can provide source code with reproducible behavior.

Offline

#8 2014-12-15 23:11

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Question about recurring error message

Snyckerbar wrote:

Is there a way to deactivate the sound during a rename?

Download the latest development version and disable "BeepOnPreview" and "BeepOnRename" in Settings.ini.

Offline

Board footer

Powered by FluxBB