Author Topic: typedef syntax  (Read 1289 times)

TouEnMasm

  • Member
  • *****
  • Posts: 1764
    • EditMasm
typedef syntax
« on: May 15, 2021, 03:56:53 AM »
Hello,
I try to write something like  "GAMMA_TABLES typedef  BYTE 256:dup(?) "
Don't seem to be the good syntax,Help!
Fa is a musical note to play with CL

Biterider

  • Member
  • *****
  • Posts: 1083
  • ObjAsm Developer
    • ObjAsm
Re: typedef syntax
« Reply #1 on: May 15, 2021, 04:17:25 AM »
Maybe this workaround
Code: [Select]
??GAMMA_TABLES struct
  repeat 256
    BYTE ?
  endm
??GAMMA_TABLES ends

GAMMA_TABLES typedef ??GAMMA_TABLES

Biterider



jj2007

  • Member
  • *****
  • Posts: 13957
  • Assembly is fun ;-)
    • MasmBasic
Re: typedef syntax
« Reply #2 on: May 15, 2021, 06:00:14 AM »
Why so complicated? Sorry, just curious...

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 10583
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: typedef syntax
« Reply #3 on: May 16, 2021, 06:39:00 PM »
I remember some time ago doing a "typedef madness" demo and with much the same comment now, more often than not, typedefs add to confusion at the expense of comprehension, a mindless attempt to drag the clarity of assembler programming into the morass of C compiler clutter.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy: