Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check which procedure or routine called Access method
Message
 
 
À
04/05/2021 03:40:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01679909
Message ID:
01680123
Vues:
36
>>A follow-up question please. So far, my test shows that program(program(-1)-1) will give what I am looking for.
>>Since I write this value to a log file, I want to be sure that it is always a string, not a numeric value. Can you think of a case where program(program(-1)-1) will give a numeric value?
>
>Saw that you already got great responses ;-)
>Danger only rises when the levels subtracted are greater than actual stack depth, as *any* negative number as parameter will return numeric.
>In practice you are probably safe to chain 2 or even 3 previous levels into single log line unless you are in actual start code.
>Trying for more levels default approach should go to astackinfo with a guard, unless specific reason speaks against it.
>Of course you could always guard with
>program(max(0, program(-1)-wantedlevell)
>calls against weird situations, but JR hints at other solution perhaps easier to grok in 6 months.
>In this case speed freak in me does neither ;-)
>
>regards
>thomas

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform