Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Similar to ALLTRIM()?
Message
De
02/11/2004 14:58:56
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00957249
Message ID:
00957254
Vues:
42
The minus sign is similar to the plus sign, but it applies trim() - not alltrim() - to the operand on the left only.

I remember having seen this in the help, but I can't tell you for sure, where. I never used it in actual practice, probably because only the first part is trimmed; so I didn't find it very practical. It does help, though, to make some expressions shorter.

>I am converting some programs from FoxPro 2.6a for Windows.
>
>Could someone explain to me what the following minus sign (-) is doing? I can't find this in VFP 6.0 Help. The man whom I am to replace says that it hits the end of the data in the Loading.Desc field, rather than the end fo the filed, which would include the spaces after the data. Why is this not listed in the Help File, or was it in FPW 2.6a?
>
>
>	IF UPPER(LOADING.adjust) = 'X'
>		REPLACE LOADING.DESC WITH ;
>			LOADING.DESC -'['-STR(LOADING.net)-'lbs]'
>		REPLACE LOADING.net WITH 0
>	ENDIF
>
>
>I would have done the following:
>
>	IF UPPER(LOADING.adjust) = 'X'
>		REPLACE LOADING.DESC WITH ;
>			ALLTRIM(LOADING.DESC) + '['-STR(LOADING.net)-'lbs]'
>		REPLACE LOADING.net WITH 0
>	ENDIF
>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform