Replacing GlobalNames with Global Values

Terry Judd terry.judd at unimelb.edu.au
Mon Feb 11 22:24:31 EST 2019


Something like...

put merge("[[gGlobal1]]*[[gGlobal2]]/[[gGlobal3]]") into tEquation


On 12/2/19, 1:58 pm, "use-livecode on behalf of Roger Guay via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:

    Granted, this may be too esoteric for me to understand, but I can’t seem to make this do what I want to do
    
    Let’s say that I have 3 globals: gGlobal1 = 10.1, gGlobal2 = 20.2 and gGlobal3 = 30.3  
    
    I have an expression like       gGlobal1*gGlobal2/gGlobal3 
    
    I want to transform this to the expression     10.1*20.2/30.3. 
    
    Seems simple enough and I can do it in my usual inelegant way, but there must be a simpler way to do this???
    
    Sorry for my confusion.
    
    Roger
    
    
    
    > On Feb 11, 2019, at 2:53 PM, Monte Goulding via use-livecode <use-livecode at lists.runrev.com> wrote:
    > 
    > put format(“%f*%f/cos(%f) = %f”, gGlobal1, gGlobal2, gGlobal3, gGlobal1*gGlobal2/cos(gGlobal3))
    
    _______________________________________________
    use-livecode mailing list
    use-livecode at lists.runrev.com
    Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
    http://lists.runrev.com/mailman/listinfo/use-livecode
    



More information about the Use-livecode mailing list