![]() |
|
||||
str Gurus( str Msg ) { Make_Message( Msg ); } void Calling { str Respose = Gurus( "Help" ); }
|
|||||
|
September 2005 Topic Links |
|||||
Welcome to the Multi Edit Software Newsletter... This issue is all about the CMac.
- Chad W. Williams
Chad Williams, CEO
**Please note that you can review/search through all forum topics, but to submit a post you must create a login identity.
|
|||||
|
![]() with our Multi-Edit Summer DiscountMESI continues our summer discount, for both New Users and Upgrade purchases of Multi-Edit v9.10
To purchase, input the coupon codes below at the
bottom of our Online Order Form.
Save $15.00 on our download versions
|
|||||
|
Updates from the VP
CMac Zips from the VP
- L. Dan Hughes
Until the next Newsletter...
L. Dan Hughes, VP/CTO
Input Your Suggestions in the
Forum:
**Please note that you can review/search through all forum topics, but to submit a post you must create a login identity. |
|||||
str Gurus( str Msg ) { Make_Message( Msg ); } void Calling { str Respose = Gurus( "Help" ); }( calling all Macro Gurus for help )
|
|||||
|
Submit Your Code Contestthese rules are permanently on display here: http://www.multieditsoftware.com/CMacContest.htm You can begin referencing our CMac articles here: http://www.multieditsoftware.com/techart.htm And don't forget to read both our VP's and Support Tech's articles in this Newsletter! Updates from the VP
The CMac "Submit Your Code" Contest Details: To participate in the "Submit Your Code contest," you must be at least 18 years old and a registered user of Multi-Edit. The contest is open to individuals with a valid Multi-Edit license. Code submissions may be included in future Multi-Edit releases and will note full recognition to the author of the code. Entries will be accepted from September 14th, 2005 through December 21st 2005 and winners will be announced and prizes awarded on January 18th, 2006.Entries can be as minor as enhanced language support, new or enhanced dialogs, new functionality or even complete add-on packages such as EZRTools, PL/SQL or Evolve. Possibilities are endless and limited only by your creativity! Enter today and have your code displayed in a commercial product that's used around the world by government agencies, military, educational institutions and most of the Fortune 500 companies. Get the exposure you deserve for your development skills, submit your entry today and gain something to brag about for years to come! Eligibility, Rules and Regulations: In order to be valid, each entry will require contestants provide complete "Registration Requirements" (noted below) and have a valid Multi-Edit serial number (any prior release accepted). You may also choose to write your code in any language, granted the code is easily integrated into ME v9.10 and contains at least some usage of the Multi-Edit CMac language. Your submission must include Source Code and a README file which explains the functionality of your submission. If your code depends on third-party packages, you must include a complete list of all packages, including exact version information and download URLs. Sorry, we cannot accept entries that require commercial software or other software that is not provided as open source or under GPL unless the code's purpose is to interface Multi-Edit with the other software package(s). Registration Requirements:
With regard to an entry you submit as part of the Contest, you grant Multi Edit Software, Inc. a worldwide, perpetual, fully paid-up, non-exclusive license to make, sell, or use the technology related thereto, including but not limited to the software, algorithms, techniques, concepts, etc., associated with the entry. If you are selected as a contest winner, you agree that Multi Edit Software, Inc. may publicize your name, likeness, and the description of work you did to win the contest. Apart from the prizes associated with being selected as a winner, Multi-Edit Software, Inc. shall not be obligated to compensate you in any way for such publicity. Entries from outside the U.S. are permitted. All entries must include an English-language explanation of the design. Entries must also include complete source code for the implementation. Entries must be submitted in machine-readable format (zipped file) via e-mail to contest@multieditsoftware.com with a subject line of "Submit Your Code Entry". You may submit multiple entries. Keep copies for your records. Multi Edit Software, Inc. assumes no responsibility for lost, misdirected, illegible or late entries or for failed computer transmissions or technical failures. Each entrant shall indemnify, defend, and hold Multi Edit Software, Inc. harmless from any third party claims, including attorneys' fees and costs, arising from or related to that entrant's participation in the Contest. In no event shall Multi Edit Software, Inc. be liable to an entrant for acts or omissions arising out of or related to the Contest or that entrant's participation in the Contest. Submission of a valid entry commits the entrant to the following:
Prizes:
Prizes will be awarded based on MESI's evaluation of the submitted code and will be judged on creativity, ease of use, usefulness of code and overall originality. Odds of winning depend on the number and quality of entries received. All taxes, including income taxes, are the sole responsibility of winners. No prize substitution is permitted. Winner(s) may be required to verify their entry. All submissions that meet eligibility requirements will receive a voucher coupon valid for $10.00 off Multi-Edit upgrade to the upcoming version 10 release scheduled for the Spring of 2006. Judging: Winners will be selected by the Multi Edit Software, Inc. development staff. The judges will grade entries using the following criteria:
The Multi Edit Software, Inc. judges shall have the sole authority and discretion to select the award recipient(s). Notification: The winning entries will be announced on the MultiEdit.com site by Multi Edit Software, Inc. on Jan 18th, 2006. Following the announcement, individual winners will be notified by e-mail. Winners have 14 days from notification to claim the prize. Prizes may be claimed by return e-mail. Unclaimed prizes will not be awarded. Prize winners will be able to choose from the winning prize or the cash value of the prize awarded. Cash value will be based on current retail prices at the time prizes are awarded. Due to import/export laws, International contestants may receive cash value for prizes awarded. Eligibility Exclusions: Multi Edit Software, Inc. employees, former employees/contractors, immediate families are not eligible to enter.
Only complete and valid registrants will be considered and selected for prizes. Void where prohibited.
|
|||||
|
- Carl Hall
Seeing as how we're promoting the CMac "Submit Your Code" contest this month I thought I'd bring out a CMac file for review and a brief explanation for the masses. This particular file is called FindDup.s and its purpose is going through files, locating duplicate entries and removing them line by line. Very handy when dealing with files that you've merged and may have multiple instances of the same line, or files such as dictionary files or email lists with potential duplicate entries that need to be removed. Why go through line after line of code, burning out your eyes, when you can locate and remove all duplicate instances within a matter of seconds? The FindDup.s macro is a great example of what CMac can do with very little programming effort and how powerful even the simplest of macros such as FindDup can be. Lets start with the actual source code for our FindDup macro. You can either copy and paste the source below
into a new File within Multi-Edit or you can download the completed source 'FindDup.s' by clicking:
void FindDup( )
/**********************************************************
Multi-Edit Macro
10-Oct-02 13:37
Function: `description`
Entry : `entry`
Exit : `exit`
Author : Dan Hughes
Copyright (C) 2002 by Multi-Edit Software, Inc
**************************************************(ldh )***/
{
str Line1[ max_Line_Length ];
str Line2[ max_Line_Length ];
// More information on max_Line_Length
// on page 214 of the CMac Users Guide
int SRefresh = Refresh;
int Count;
// More information on Refresh
// on page 110 of the CMac Users Guide
Refresh = false;
Count = 0;
Line1 = Get_Line( );
// More information on Get_Line
// on page 221 of the CMac Users Guide
while ( !At_Eof ) {
Goto_Col( 1 );
// More information on Goto_Col
// on page 117 of the CMac Users Guide
Down;
if ( At_Eof( ) ) {
Make_Message( "No Duplicates" );
break;
// More information on Make_Message
// on page 204 of the CMac Users Guide
}
Line2 = Get_Line( );
// DebugLog( 0, "FindDup", "1=%s 2=%s", Line1, Line2 );
// 1
// 1
if ( Line1 == Line2 ) {
++Count;
// DebugLog( 0, "FindDup", "Duplicate Line=%s", Line2 );
Up;
Del_Line;
// More information on Del_Line
// on page 220 of the CMac Users Guide
// Make_Message( "Duplicate Line" );
// break;
}
Line1 = Line2;
}
if ( Count ) {
Make_Message( "Found " + Str( Count ) + " duplicates." );
}
Refresh = SRefresh;
}
// FindDup
If you've chosen to copy the above source into a new file within Multi-Edit, you'll need to save the file using filename FindDup.s before continuing. Once your source code has been created and saved, or opened from the above link, you will need to compile
it in order to be able to create and run the .mac file from within Multi-Edit. Steps
for compiling Multi-Edit macro source can be found at: Now that you've compiled your macro, you're going to want to test it out on a file. I have conveniently
provided you with a sample.txt "dictionary" file which contains a number of duplicate entries. You can
download this sample.txt file by right clicking | Save Target As: You now have your source code compiled, a .mac file has been created, and you've obtained our sample.txt file to work with. Now, open the sample.txt file and select from the Multi-Edit menu, Macro | Run. The Run Macro dialog will now appear for you to enter the macro name you wish to run, in this case, FindDup. The macro name will be case sensitive and will need to be entered exactly as defined in the first line of code within the macro "void FindDup( )". Type in FindDup, and click okay to run the macro. The macro is so quick that you may not notice that it has already removed 5 duplicate entries from the sample.txt file. The status of the macro run is displayed in the status bar in the lower left of the Multi-Edit window and will note "Found 5 Duplicates". You may have noticed that there are numerous comments which point to the CMac Users
Guide for more information within the FindDup macro. I intentionally did this to show that all the
code functions used in this simplest of macros is documented in full detail and in most cases provides real
world examples of usage within the CMac Users Guide. I cannot stress to you
enough, both to experienced users and beginners how useful and valuable the CMac Users
Guide is to those who intend to use or are already using CMac to improve
their coding quality and speed! Be sure that you purchase your copy of the "CMac Users
Guide" today at our online order form at: Folks, that's all there is to it! Be creative, consider your overall intention for creating your macro, code it, compile it and you're done and ready to run! Thank you, and as always I'm,
As always, any suggestions for a future tech article are always welcome at my email address: Carl Hall: carlh@multieditsoftware.com
|
|||||
|
------------------------------Multi-Edit Partners---------------------------- ..
|
|||||
|
.. If your e-mail application has trouble viewing this in HTML format, you can also view it online at http://www.multieditsoftware.com/TheDev/v02_i06_2005.htm
|
|||||
|
Multi-Edit, the Multi-Edit "packaging"and logo,
SAS is a registered trademark of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.
Multi Edit Software, Inc. 3370 N. Hayden Rd. #123 PMB 712 Scottsdale, Arizona 85251 . |
|||||