flat assembler
Message board for the users of flat assembler.

Index > Main > count of string items into array

Author
Thread Post new topic Reply to topic
Alessio



Joined: 26 Sep 2003
Posts: 35
Location: Viterbo, Italy
Alessio
Hi,

I define an array in this way:

Code:
szString1 TCHAR 'string 1',0
szString2 TCHAR 'string 2',0
szString3 TCHAR 'string 2',0

szStringArray dd szString1,szString2,szString3
    


to get items count I use:

Code:
iStringArray = ($-szStringArray) / 4
    


How can I replace the '4' with size of szStringArray ( dd ) ?
Post 17 Nov 2008, 14:03
View user's profile Send private message MSN Messenger Reply with quote
asmcoder



Joined: 02 Jun 2008
Posts: 784
asmcoder
[content deleted]


Last edited by asmcoder on 14 Aug 2009, 14:55; edited 1 time in total
Post 17 Nov 2008, 14:17
View user's profile Send private message Reply with quote
Alessio



Joined: 26 Sep 2003
Posts: 35
Location: Viterbo, Italy
Alessio
There's no a kind of sizeof.DWORD ?
Post 17 Nov 2008, 14:24
View user's profile Send private message MSN Messenger Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
make some yourself: sizeof.DWORD = 4, sizeof.WORD = 2, sizeof.QWORD = 8, sizeof.DQWORD = 16
define them in your win32a.inc (or win32w.inc), that way you'll have them defined for all your programs.
Post 17 Nov 2008, 21:28
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.