Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: BDS - Genero Migration - Arguments  (Read 8101 times)
Stephen T.
Posts: 114


« on: October 24, 2013, 10:59:56 am »

BDS - 3.55.01.40 Genero 2.40.03

If no arguments are passed to a program, but the program uses code akin to:

LET l_char = ARG_VAL(1)

The value in l_char appears to differ between BDS and Genero. In Genero, l_char seems to be NULL, where in BDS l_char would appear to be blank. This then obviously affects subsequent comparisons.

 WHENEVER ANY ERROR CONTINUE
   
    INITIALIZE l_char   TO NULL
    LET l_char          = ARG_VAL(1)
    IF l_char = 'A' THEN
        DISPLAY 'Char (',l_char,') is A'
    ELSE
        DISPLAY 'Char (',l_char,') is NOT  A'
    END IF   
    IF l_char != 'A' THEN
        DISPLAY 'Char (',l_char,') is NOT A'
    ELSE
        DISPLAY 'Char (',l_char,') is  A' -- Assumed!
    END IF   
    IF l_char IS NULL THEN
        DISPLAY 'Char Is NULL'
    ELSE
        IF l_char = " " THEN
            DISPLAY 'Char Is Space'
        ELSE
            DISPLAY 'No Idea What Char Is, But It Is Not NULL'
        END IF
    END IF       

Typically, the code in this migration performed the tests like the first two - ie compared the argument variable to be equal or not equal to a set value and ignored null.

Nuno G.
Posts: 38


« Reply #1 on: October 25, 2013, 05:36:29 pm »

Sugestion
Replace

Let l_var = nvl(arg_val(1), " ")

Other sugestion would be to try
Base.application.getArgument(i)

Don`t really know if there will be any diference but it is worth a go.

Hih
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines