Information générale
Catégorie:
Codage, syntaxe et commandes
Edward,
>>Ed,
>>
>>So you're saying that if I had a memo field with the following in it:
>>SELECT foobar
>>ln_count = 0
>>SCAN WHILE foobar.item = "TEST"
>> ? foobar.description
>> ln_count = ln_count + 1
>>ENDSCAN
>>? ln_count
>>
>>That the following code would run it correctly through macro expansion?
>>
>>for n=1 to memlines(memofield)
>> cCommand=mline(memofield,n)
>> &cCommand.
>>endfor
>>
>>I tried something similar, but it didn't work. It generates an error when you try to macro expand the initial loop line. Any way around that?
>
>This code was tested before posted. You probably have syntax error inside memo field code.
This can't work. You would get a nesting error when &cCommand came out as the SCAN line - a SCAN without an ENDSCAN. The same would be true of any kind of looping construct.
I keep meaning to find time to look at CodeBlock to see how it handles this.
Matt.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement