Sign in to follow this  
Followers 0
stg68

Two dimensional array. Beginner..

4 posts in this topic

I am a beginner here. I would really appreciate your help.

I have two txt files. Each file has 5 lines of values. I would like to build a two dimensional array from two files. Then, compare 1-st line from first file with the 1-st line of second file within array until end of file in order to compare all lines. If, not equal then message box. "Not Equal".

THANKS MUCH FOR YOR HELP!

Share this post


Link to post
Share on other sites



I am a beginner here. I would really appreciate your help.

I have two txt files. Each file has 5 lines of values. I would like to build a two dimensional array from two files. Then, compare 1-st line from first file with the 1-st line of second file within array until end of file in order to compare all lines. If, not equal then message box. "Not Equal".

THANKS MUCH FOR YOR HELP!

#include<file.au3>

Dim $aFile1, $aFile2

_FileReadToArray("file1.txt",$aFile1)

_FileReadToArray("file2.txt",$aFile2)

For $X = 1 to $aFile1[0]

If $aFile1[$X] <> $aFile2[$X] Then MsgBox(0,"","Not Equal")

Next

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I did a search of the forums for "file comparison" - in quotes - and found this and this post too - simple.

Edited by Squirrely1

Das Häschen benutzt Radar

Share this post


Link to post
Share on other sites

Thank you All for your help!

Share this post


Link to post
Share on other sites

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  
Followers 0