Sign in to follow this  

Quick Delphi question.

This topic is 3411 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm new to programming and Delphi and stuff so if this is in the wrong forum sorry lol. I have two arrays called WinCheckP1[i,j] and WinCheckP2[i,j]. Is it possible to make part of the name a variable so something like this could work. for a : 1 to 2 do WinCheckP a [i,j] I've tried a bunch of stuff but I cant get it to work and I don't want to have double the code because it looks messy. Thanks.

Share this post


Link to post
Share on other sites
Quote:
Original post by tpascal

type
twincheck = array[0..9,0..9] of integer;
var
a:integer;
WinCheckP : array[1..2] of twincheck;
begin
for a:=1 to 2 do WinCheckP[a][i,j]:=0;

end;


Thanks man, it worked great.

Share this post


Link to post
Share on other sites

This topic is 3411 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this