FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
Passing Filename as parameter
Passing Filename as parameter
Débuté par DT, 04 juin 2003 12:36 - 3 réponses
Connectez-vous…
DT
#1
Posté le 04 juin 2003 - 12:36
Hi All
I am writing a global procedure to format Name & Address data (get rid of
empty lines etc)
I have this information in a number of different datafiles (identical format
obviously) so the plan was that I would call the procedure sending 2 parameters,
"p_Filename" and "p_RecordISN"
Hfilter, HreadFirst and HReadNext all accept the p_Filename parameter and
return the correct record(s)
The problem arises if I try to use the data
sTextString = p_Filename.Address1 for example results in an error regarding
the .
I have tried various combinations of "" without success
Substituting the p_Filename for the actual filename to populate sTextString
works as expected
Any ideas - or better still a solution
Regards
DT
Signaler
0
0
Peter van Vuuren
#2
Posté le 04 juin 2003 - 12:48
"DT" <derek.theobald@dolgader.co.uk> wrote:
Hi All
I am writing a global procedure to format Name & Address data (get rid of
empty lines etc)
I have this information in a number of different datafiles (identical format
obviously) so the plan was that I would call the procedure sending 2 parameters,
"p_Filename" and "p_RecordISN"
Hfilter, HreadFirst and HReadNext all accept the p_Filename parameter and
return the correct record(s)
The problem arises if I try to use the data
sTextString = p_Filename.Address1 for example results in an error regarding
the .
I have tried various combinations of "" without success
Substituting the p_Filename for the actual filename to populate sTextString
works as expected
Any ideas - or better still a solution
Regards
DT
Here you are with one of my favourite Windev possibilities
(apart from things like dynamic compilation) : 'Indirection'
Look for it in the help ...
example:
-------------------------
sTextString = {p_Filename+".Address1"} //or something
--------------------------
greetings,
Peter
Signaler
0
0
DT
#3
Posté le 04 juin 2003 - 13:44
Peter
Many thanks - your solution (and code example) was correct
Now why did I not think of that?????
I have read the Indirection help, as you say interesting possibilities although
I have somehow to get to grips with the specific uses of " ' and + when constructing
the directives
dynamic compilation - I'm not going to go there, 6 months away from that
one
Regards
DT
Signaler
0
0
RB
#4
Posté le 04 juin 2003 - 20:36
"Peter van Vuuren" <petervu@xs4all.nl> wrote:
"DT" <derek.theobald@dolgader.co.uk> wrote:
Hi All
I am writing a global procedure to format Name & Address data (get rid
of
empty lines etc)
I have this information in a number of different datafiles (identical format
obviously) so the plan was that I would call the procedure sending 2 parameters,
"p_Filename" and "p_RecordISN"
Hfilter, HreadFirst and HReadNext all accept the p_Filename parameter and
return the correct record(s)
The problem arises if I try to use the data
sTextString = p_Filename.Address1 for example results in an error regarding
the .
I have tried various combinations of "" without success
Substituting the p_Filename for the actual filename to populate sTextString
works as expected
Any ideas - or better still a solution
Regards
DT
Here you are with one of my favourite Windev possibilities
(apart from things like dynamic compilation) : 'Indirection'
Look for it in the help ...
example:
-------------------------
sTextString = {p_Filename+".Address1"} //or something
--------------------------
greetings,
Peter
Hi peter, I enjoy you message.
Yes Wd indirections are really good to use. But they are not alone.
want more ? have a look at :
- wd7.5 properties, they covert allmost all what you do with editors... and
more.
- wd7.5 functions hlistxxx or enumxxx (good with indirection)
then, if tou have good naming rules for files and item, you can manage big
processes with small code.
more again ?
data sources that offer realy more than a simple sql result recept. (see
my tutorial at my homepage, in french sorry i cannot translate for the moment)
well very nice thing that make programming a pleasure at times.
One only resting dream : runtime on linux devices...
Good job
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte