Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I script over my method code to work on it?
Message
De
19/11/2009 10:37:22
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01435595
Message ID:
01435602
Vues:
59
>>I now have a preference for formatting my code from this:
>>
>>
>> m.job_num=alltrim(job_num)
>> lcJobNo=alltrim(job_num)
>> x=y+1
>> lcString='Please help+lcMe+'fix this.'
>>
>>
>>to this:
>>
>>
>> m.job_num = alltrim(job_num)
>> lcJobNo = alltrim(job_num)
>> x = y + 1
>> lcString = 'Please help+lcMe + 'fix this.'
>>
>>
>>Notice the spaces before and after the '+' and '=' signs? I just like the way it spreads out the code an makes it easier to read. Problem is, I've gots lots of old code that is written without the spaces. How could I fix this? When I open a method in the code editor, is there some script I can run? I tried to use Beautify, but no luck.
>>
>>Even worse, some methods have a mixture of the old way and the new way, so parsing though it all will require paying attention to that detail.
>>.
>
>You may replace '=' with ' = ' ,but it may not work exactly if your = is already with spaces. I guess it's time for regular expressions...


How can you implement regular expressions in the Find/Replace dialog box?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform