Quoi, tu ne connais pas PB ? Va falloir parcourir tout le forum alors !

Le forum (ô combien francophone) des utilisateurs de Powerbuilder.

Recherche rapide

Annonce

Certaines rubriques, dont des cours, sont uniquement visibles par les membres du forum ^^.
Dans la rubrique Liens & Références, vous avez accès à un sommaire de téléchargement, profitez-en !
Il existe maintenant un nouveau TOPIC "Votre CV en Ligne" accessible uniquement par demande.

#1 23-10-2006 09:11:56

Deedoo2000  
Membre Geek
Date d'inscription: 13-09-2006
Messages: 91
Pépites: 408
Banque: 0

Maximum script size exceeded

Bonjour,

Lorsque j'essaie de sauver mon script qui fait 553 lignes j'ai ce message, alors que la compil se passe bien.
Pour info, un autre script un peu plus long se sauvegarde bien.

Quelle est la longueur ou taille max d'un script ? Et que puis-je faire pour remédier à mon pb à part exécuter un sous script ?
Merci.

Hors ligne

 

#2 23-10-2006 09:20:28

pick ouic  
La bourse ou la vie ^^
Award: gearotter
Lieu: Massy-Verrières
Date d'inscription: 29-05-2006
Messages: 4658
Pépites: 942
Banque: 2,147,483,647
Site web

Re: Maximum script size exceeded

c'est le message que tu as dans powerbuilder ?
ou dans une procédure stockée ?


dans pb, c'est limité à un certain nombre de caracteres par script.
Quelqu'un peut me confirmer ?


Connaitre son ignorance est une grande part de la connaissance.
http://animegifs.free.fr/anime/mazinger/mazinger.gif

Hors ligne

 

#3 23-10-2006 09:20:58

Deedoo2000  
Membre Geek
Date d'inscription: 13-09-2006
Messages: 91
Pépites: 408
Banque: 0

Re: Maximum script size exceeded

C'est dans PB... Ca m'embête cette limite

Hors ligne

 

#4 23-10-2006 09:34:30

pick ouic  
La bourse ou la vie ^^
Award: gearotter
Lieu: Massy-Verrières
Date d'inscription: 29-05-2006
Messages: 4658
Pépites: 942
Banque: 2,147,483,647
Site web

Re: Maximum script size exceeded

Trouver dans l'aide de PB

Limit on size of compiled Pcode scriptPcode is the interpreted language into which scripts are compiled. There is anundocumented internal limit on the size of compiled Pcode on any script. Ascript that exceeds this limit can be compiled successfully, but the error“Maximum script size exceeded” displays when you attempt to save the script. Note that the amount of Pcode generated from a given script is not directlyproportional to the number of lines of code, so you might encounter this error in a script with 1200 lines of code, but not in a script with 1500 lines of code.To avoid receiving this error, move code to functions that you post or trigger inthe event script.

et sur un autre forum...

This Problem also comes if you copy the script to notepad or any for modification and after you copy it to the function or to any relevant events of the Datwindow, Window or Command Objects. I've found and experienced it many a times. And I also have very large scripts if it is coded continiously, there is no prolem. If I copy the script from somewhere and mofiy it then this problem comes. I try to resolve it by removing the unwanted space from the script. And in some cases I Divide the script into different parts and put into the different functions. So I suggest not to copy and paste the script within the different objects, or from anywhere. And to less use the Carriage returns in the script. Any how this is my experience, I don't know exactly what may be the reason.

Conclusion, tu dois decomposer en plusieurs sous fonctions....

et sur d'autres encore...

The limit is based on the size of the compiled PCode, not the size of the source
code. Some code converts larger, some converts smaller. For example, while most
standard system functions will convert down to a token, embedded SQL is stored
byte-for-byte (which is why you can read it in a PBD, but not much else).

I am having this since PB4 up to PB7 8033 in all builds (first time we made a
really big script for some messaging system written in PB4 16 bit then we moved
to PB5 32 bit and it didn't help). Now I have some other project with the same
problem in PB6 and PB7. My feeling this is general PB script "p-code" compiler
limitation based on the selected memory model and not using "far" memory
pointers.

Also note that comments and empty "spaces" gets removed when compiled so they
have effect on the "MAXIMUM SCRIPT SIZE EXCEEDED".


My general recomendation is to break if possible very long CASE constructions in
one script into several smaller scripts with some code duplication and some
maintanence overhead.


As for the 32K limit people often aks about the limit on strings and blobs which
is limited by the virtual memory since PB5/32. This has nothing to do with the
script size.


Connaitre son ignorance est une grande part de la connaissance.
http://animegifs.free.fr/anime/mazinger/mazinger.gif

Hors ligne

 

#5 23-10-2006 09:35:55

Deedoo2000  
Membre Geek
Date d'inscription: 13-09-2006
Messages: 91
Pépites: 408
Banque: 0

Re: Maximum script size exceeded

snif... bon ok, merci.

Hors ligne

 

Pied de page des forums

Propulsé par FluxBB 1.2.22