Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Maximum number of parameters in a method of a class
Message
De
21/10/2015 14:50:03
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01626276
Message ID:
01626281
Vues:
73
>It is an existing method of a class and we're normally passing everything as parameters. Here is the current declaration of this method
>
>
>procedure ValidatePass(tcSalesPoint as string, tcOperator as string, tcPassTable as string, ;
>		tcWhichKey as string, tcPrefix as string, tnPassNo as double, tcDptCatItm as string, ;
>		tnNumVals as integer, tcPhysLocation as string, ttScanDateTime as datetime, tnParentNo as double, ;
>		tcNoTrans as string, tnScanNo as double, tnSiteNo as integer, tcScanNo as string, ;
>		tcCheckpointName as string, tcCheckpointValue as string, tlTrickle as Boolean, tyPrice as decimal, ;
>		tnTransNo as double, tnCreatedPassNo as double, tcAutoSaleDCIs as string, ;
>		tlFromScanner as Boolean, tcPassNo as string, tnBenefitID as double, tcMbRedemptions as string) as string ;
>		helpstring "Process a validation for a passholder record including updating record and recording log entries."
>	
>
>So, normally I would add an extra parameter (as I need to add tnExtraDays parameter). I guess I have no other choice but to create nExtraDays property of the class and use it instead and re-set in each call. The problem is that I already coded another method to use parameter and for consistency I think I'll change that method as well to use that new property.

If it is contained, such as a class calling a method of its own, I would use parameters. This usually does not evolve and are usually limited to a few parameters. For client applications, calling those class public methods, I would pretty much always use class properties.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform