Problem with piece of code

Sv1N2SSv1N2S Member Posts: 13
Hello All. I have some problem with code:
FOR I := 255 DOWNTO 128 DO CharTXr[CharTX] := I;
Its strange Because in nav2009 it is work good, but in 2017 I get error like on screen. Can You explain me why?

fc8quftq60t7.jpg

Answers

  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    edited 2018-05-24
    The expression "CharText[someinteger]" returns char data type, not an integer, and requires integer to index the CharText variable. Apparently NAV 2017 cannot implicitly convert from char data type to integer in this particular context. I guess adding an intermediary integer var like this
    BEGIN idx := CharText[i]; CharText[idx] := i  END
    
    should help.
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Sv1N2SSv1N2S Member Posts: 13
    Thanks for your reply. It works
Sign In or Register to comment.