Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Code Diff

Posted on 2003-12-10
7
Medium Priority
?
359 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 160 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

610 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