campo-sirio/al/examples/ex19con.cpp
alex 714dd74636 Archive Library versione 2.00
git-svn-id: svn://10.65.10.50/trunk@5350 c028cbd2-c16b-5b4b-a496-9718f37d4682
1997-10-09 16:09:54 +00:00

76 lines
2.0 KiB
C++
Executable File

//
// EX19CON.CPP
//
// C++/DOS Example program for ArchiveLib 2.0
//
// Copyright (c) Greenleaf Software, Inc. 1994 - 1996
// All Rights Reserved
//
// MEMBERS/FUNCTIONS DEMONSTRATED
//
// ALName::ALName()
// ALName::~ALName()
// ALName::ChangeExtension()
// ALName::ChangeTrailingChar()
// ALName::GetName()
// ALName::StripFileName()
// ALName::StripPath()
// ALName::WildCardMatch()
//
// DESCRIPTION
//
// This program demos the wild card matching functions. You can see
// that the wildcards we support here are just a little bit better than
// those that you get for free with MS-DOS wild card matching.
//
// We also demo a bunch of the ALName functions here.
//
// REVISION HISTORY
//
// February 1, 1996 2.0A : Second release
//
//
#include <conio.h>
#include "arclib.h"
int main()
{
cout << "Archive Library 2.0\nEX19CON.CPP\n\n";
cout << "This program demos the wild card matching functions. You can see\n";
cout << "that the wildcards we support here are just a little bit better than\n";
cout << "those that you get for free with MS-DOS wild card matching.\n\n";
getch();
ALName test( "Greenleaf Software", AL_UPPER );
cout << "test = " << test << "\n";
cout << "test.WildCardMatch( \"*Soft*\" ) = "
<< test.WildCardMatch( "*Soft*" )
<< "\n";
cout << "test.WildCardMatch( \"*Hard*\" ) = "
<< test.WildCardMatch( "*Hard*" )
<< "\n";
cout << "test.WildCardMatch( \"GREENLEAF ????ware\" ) = "
<< test.WildCardMatch( "GREENLEAF ????ware" )
<< "\n";
ALName file( "EX19CON.CPP" );
cout << "file = " << file.GetName() << "\n";
cout << "file.ChangeExtension() = "
<< file.ChangeExtension()
<< "\n";
file = "EX19CON.CPP";
cout << "file.ChangeTrailingChar() = "
<< file.ChangeTrailingChar()
<< "\n";
file = "EX19CON.CPP";
cout << "file.StripFileName() = "
<< file.StripFileName()
<< "\n";
file = "EX19CON.CPP";
cout << "file.StripPath() = "
<< file.StripPath()
<< "\n";
return 1;
}