How to create an array of char?

galmokgalmok Member Posts: 44
I have read some code where a variable was declared like this:

CharVar@1000000002 : ARRAY [32] OF Char;

How do I create such a variable using the "C/AL Globals" windows?

I cannot enter "ARRAY [32] OF Char". "Char" is accepted but is only 1 character large. This seems simple but the logic escapes me. ;-)

Comments

  • frandefrande Member Posts: 17
    Hi,

    In the properties for the global (or local) variabel set property Dimension to the dimension your want in the array. For example 32.

    Have you tried that?
    Best regards,

    Kristian
  • galmokgalmok Member Posts: 44
    I completely forgot about the Properties windows. What a blunder... :?

    Thanks for the reminder. Everything is fine again. :-)
  • krikikriki Member, Moderator Posts: 9,110
    You can also use a text variable as an array of char:
    txtSomeString Text1024
    txtSomeString[1] := 64;
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.