Paradox Community

Items in pnews.paradox-programming

Subject:Re: constantNameToValue for user-defined constants?
Date:Thu, 28 Jul 2022 10:26:45 -0500
From:Mark Bannister <markRemove@THISinjection-moldings.com>
Newsgroups:pnews.paradox-programming
This is what I do.
It can add a step to debugging, but it also allows you ask if a constant 
is in a certain range then perform some action.    For instance I have a 
lot of code that calls common methods, but in that method  I also want 
to know the context of why it was called.  For instance did a timer call 
this, user, etc. or what group of tables I am working with, part 
numbers, documents, user tables?

On 7/28/2022 12:30 AM, Kevin Zawicki wrote:
> Since you set the constant value...
> 
> you can do this to see the value
> 
>   const
>    myVal = number(13)  ;better to always specially cast constants?
>   endconst
>   var
>    anyVal anyType
>   endvar
> 
>   view(myVal)   ;viewing constant
> 
>   anyVal = myVal
>   anyVal.view()
> 
> 
> What would be a practical example of needing constantNameToValue for user
> defined constants?
> 
> 
> 
> "Thies Grimm" <thies.grimm@t-online.de> wrote:
>>
>> hi,
>> is there a simular function like constantNameToValue for user-defined cunstants?
>>
>> if I want to know the value of fbTable and I have fbTable just as string
>> I might do:
>> myValue = constantNameToValue(stTable)
>>
>>
>> Is there a simular function for my own constants?
>> const
>>   fbOffice = 128
>> endConst
>>
>>
>>
>>
>>
>>
> 

-- 
Mark B


Copyright © 2004 thedbcommunity.com