Announcement

Collapse
No announcement yet.

Asciiz*9?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cecil Williams
    Guest replied
    Aisin,

    GLOBAL szAppName AS ASCIIZ*9 defines how long the ASCIIZ is, 8
    full characters plus the terminating null.

    TCHAR szAppName[]=TEXT ("XXXXXXX"); is an undefined string array
    in C. Without a value in the brackets, you can make the string
    length to your liking, sorta like Basics dynamic string.

    Just so happens that in C you can define and initialize in the
    same statement. Hope this helps!!!

    Cheers,
    Cecil



    ------------------

    Leave a comment:


  • Aisin Geuru Suen Yue
    Guest started a topic Asciiz*9?

    Asciiz*9?

    Everytime I try to read the Petzold example in PB format,
    I saw this:
    GLOBAL szAppName AS ASCIIZ*9
    Why need to put the ASCIIZ*9? In the original C code will be
    TCHAR szAppName[]=TEXT ("XXXXXXX");
    Any advise on this?
    Thank



    ------------------
Working...
X
😀
🥰
🤢
😎
😡
👍
👎