The best way to post source code
ASNA Forums
 Browse Old Forum     Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



The best way to post source code Expand / Collapse
Message
Posted Thursday, May 08, 2008 12:08 PM Post #25
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
Which code you prefer to read? This...

BegSr button1_Click Access(*Private) Event(*this.button1.Click)

DclSrParm sender *Object

DclSrParm e System.EventArgs

Connect pgmDB

DclFld Status Type( *Integer4 )

Status = ClearMember( pgmDB, "Membership", "[User]", "*First" )

If ( Status = dgErrorNumber.dgEOK )

MsgBox "File cleared successfully."

Else

MsgBox "Error code encountered: " + Status.ToString()

EndIf

Disconnect pgmDB

EndSr

Or this...

    BegSr button1_Click Access(*Private) Event(*this.button1.Click)

        DclSrParm sender *Object

        DclSrParm e System.EventArgs

 

        Connect pgmDB

 

        DclFld Status Type( *Integer4 )

 

        Status = ClearMember( pgmDB, "Membership", "[User]", "*First" )

        If ( Status = dgErrorNumber.dgEOK )

            MsgBox "File cleared successfully."

        Else

            MsgBox "Error code encountered: " + Status.ToString()

        EndIf

 

        Disconnect pgmDB

    EndSr       

To get the latter result, download a free copy of the CopySourceAsHtml utility and use its "Copy as HTML" option to paste code from Visual Studio to our forum.

http://www.jtleigh.com/people/colin/software/CopySourceAsHtml/

While we can't enforce the use of utility, the quality of post responses will be directly proportionate to the readability of the code you post!

See this post for a bit of further discussion and examples:

http://forum.asna.com/Topic9-14-1.aspx

rp


Please consider using the free Visual Studio CopyAsHtml add-in to post code to our forum. See this post for more
info:
http://forum.asna.com/Topic25-34-1.aspx

Download it free at (new link--the previous one was broken):
http://scottonwriting.net/sowblog/posts/13478.aspx

« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: barry, cirserrot, edsoliz, fgarcia, jao, rbriggs@asna, rogerpence, timj, torosco, dciarrocchi, dtoedt

Permissions Expand / Collapse

All times are GMT -6:00, Time now is 8:50pm

© 2008. Amalgamated Software of North America. All rights reserved.