Solved

Code Diff

Posted on 2003-12-10
7
357 Views
Last Modified: 2011-09-20
Hello

How can I create a code-diff?
I will see the differences between two files:
-identic lines
-changed lines
-added lines
-deleted lines
I need an algorithm or a program code to do this


bye
Ramoni
0
Comment
Question by:Ramoni
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 2

Expert Comment

by:diarmaid
ID: 9912595
I not sure exactly what your looking for.
You can use 'FC' from the command line to compare txt (code) files
usage FC file1 file2, use fc /? to get a full list of options
0
 

Author Comment

by:Ramoni
ID: 9918682
i dont know how the fc command works, but can i take it for arrays of string or only strings (with Cr)? and whats the return value of the function?

exactly im looking for a compare meachanism to compare two arrays of strings -line for line.
I want to show the differences of the two arrays:
deleted, added and changed lines.
0
 
LVL 2

Expert Comment

by:diarmaid
ID: 9919282
You use FC to compare two files
Just open the (dos) command prompt and type in FC FILENAME1 FILENAME2 and it returns the differences.

To compare two arrays of strings, you will have to write a function to do it. Are the arrays going to be fixed size single dimension or  multi dimension arrays or are they goin to be dynamic.
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:Ramoni
ID: 9919556
Thats my problem: how to write a function to compare the arrays.
I have two single dimension arrays, each array element for one line -> you can also create a "long" string with all elements of one array, and then compare the two strings.
I need a algorithm to compare..., within you can detect identic, deleted, added and changed lines.
0
 
LVL 9

Accepted Solution

by:
Dang123 earned 40 total points
ID: 9920463
0
 
LVL 27

Expert Comment

by:planocz
ID: 10260559
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
No response from Ramoni from 12/11/2003 comment
Award points to Dang123 is recommend.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

planocz
EE Cleanup Volunteer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question