PB à toute heure et à tout moment. (à parcourir avec modération)

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 11-06-2008 08:22:21

Quentin  
Membre
Date d'inscription: 13-07-2007
Messages: 2
Pépites: 223
Banque: 0

Problème access à une procedure.

Je dois écrire une procédure qui prend en argument un tableau de long mais je ne sais pas comment je dois faire.
Pouvez-vous m'aider ?


Merci.

Hors ligne

 

#2 11-06-2008 08:43:34

erasorz  
Admin
Lieu: Babylone
Date d'inscription: 23-11-2006
Messages: 5121
Pépites: 97,197
Banque: 2,147,483,647

Re: Problème access à une procedure.

en gros dans la déclaration de la fonction tu mets Argument type = Long et Argument name =  al_tableau[]

et pour l'appel :   

Code: pb

Long ll_tableau[]
f_ta_fonction( ll_tableau )


F1 a écrit:

Passing arrays

When an argument is an array, you specify brackets as part of the argument name in the declaration for the function or event.

Variable-size array as an argument

For example, suppose a function named uf_convertarray accepts a variable-size array of integers. If the argument's name is intarray, then for Name enter intarray[ ] and for Type enter integer.
In the script that calls the function, you either declare an array variable or use an instance variable or value that has been passed to you. The declaration of that variable, wherever it is, looks like this:

integer a[]

When you call the function, omit the brackets, because you are passing the whole array. If you specified brackets, you would be passing one value from the array:

uf_convertarray(a)

Fixed-size array as an argument

For comparison, suppose the uf_convertarray function accepts a fixed-size array of integers of 10 elements instead. If the argument's name is intarray, then for Name enter intarray[10], and for Type enter integer.
The declaration of the variable to be passed looks like this:

integer a[10]

You call the function the same way, without brackets:

uf_convertarray(a)

If the array dimensions do not match    If the dimensions of the array variable passed do not match the dimensions declared for the array argument, then array-to-array assignment rules apply. For more information, see "Declaring arrays ".


N'envoyez jamais un humain faire le travail d'un programme.

Hors ligne

 

#3 11-06-2008 08:55:06

Quentin  
Membre
Date d'inscription: 13-07-2007
Messages: 2
Pépites: 223
Banque: 0

Re: Problème access à une procedure.

oui mais c'est une procedure oracle et c'est la le problème.

Hors ligne

 

#4 11-06-2008 08:59:14

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: Problème access à une procedure.


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

Hors ligne

 

Pied de page des forums

Propulsé par FluxBB 1.2.22