hexagon logo

IF_GOTO/C1.INPUT and multiple languages...

OK, I'm stumped (not really, but I would like a general solution).

If I have an IF_GOTO/C1.INPUT == "YES" in my program, it will break when I change PC-DMIS to Swedish.

So, I can write IF_GOTO/(C1.INPUT == "YES") or (C1.INPUT == "JA") to make it work in English and Swedish (and some more, like German).

But how do I write to have it work in the current language PC-DMIS is set to, whatever language that is?

In the Report Editor there's a function LOADSTR(xyz) which can get the current translation of string #xyz, but that doesn't work in a part program.
Parents
  • Try this (you have to use INPUT type of comment):

    C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
    Svara JA eller NEJ!
    1-YES (JA), 2-NO (NEJ)

    IF_GOTO/C1.INPUT=1,GOTO = SVAR_JA
    IF_GOTO/C1.INPUT=2,GOTO = SVAR_NEJ
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
    Du svarade något annat än "JA" eller "NEJ"
    GOTO/****
    SVAR_JA =LABEL/
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
    Du svarade "JA"
    GOTO/****
    SVAR_NEJ =LABEL/
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
    Du svarade "NEJ"
    GOTO/****
    **** =LABEL/
Reply
  • Try this (you have to use INPUT type of comment):

    C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
    Svara JA eller NEJ!
    1-YES (JA), 2-NO (NEJ)

    IF_GOTO/C1.INPUT=1,GOTO = SVAR_JA
    IF_GOTO/C1.INPUT=2,GOTO = SVAR_NEJ
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
    Du svarade något annat än "JA" eller "NEJ"
    GOTO/****
    SVAR_JA =LABEL/
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
    Du svarade "JA"
    GOTO/****
    SVAR_NEJ =LABEL/
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
    Du svarade "NEJ"
    GOTO/****
    **** =LABEL/
Children
No Data