College project for a friend

Discuss all aspects of programming here.

Moderator: The Mod Squad

College project for a friend

Postby EmilyB » Tue Nov 22, 2005 8:17 am

1. With help of the below code excerpt explain what self re-writing code is?
2. Why can this be considered as a bad programming method?

Dim COLUMN_NAME as string
Dim inputValue as variant
R16;COLUMN_NAME is assigned different values (inputValue) and the below segment is iterated.

Dim libFileNo as integer

libFileNo = FreeFile

Open SQAGetDir(SQA_Dir_Scripts) & "library.rec" For Output As #libFileNo
call PCUtil_writeToTestLogger( "LOW", "library.rec file opened", C_DP_TAG )

Print #libFileNo, str( "global " & COLUMN_NAME & " as variant" ) Print #libFileNo, Print #libFileNo, str( "sub main" )
Print #libFileNo, str( COLUMN_NAME & "=\"" & inputValue & "\"" )
Print #libFileNo, str( "SQALogMessage SQANone, \"" & COLUMN_NAME & "=" & inputValue & "\", \"COLUMN_NAME\" " )
Print #libFileNo, str( "end sub" )
Close #libFileNo

callscript "library"


I have no clue so I thought Id ask :)

Postby Toby B. » Wed Nov 23, 2005 9:54 pm

8O 8O

What coding language is that??? Nothing like I have ever seen before... 8O 8O
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
Posts: 14298
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby EmilyB » Thu Nov 24, 2005 1:11 am

Toby B. wrote:8O 8O

What coding language is that??? Nothing like I have ever seen before... 8O 8O

:mb_dontknow:: Shes in college and just asked if I knew any resources for help and I could only think of this website :mb_dontknow::

Other than that I know nothing :oops: But I could try asking :)

Postby ~PJ~ » Thu Nov 24, 2005 4:04 am


Let there be respect for the earth,
Peace for its people,
Love in our lives,
Delight in the good,
Forgiveness for past wrongs,
And from now on a new start.
Black Belt 5th Degree
Black Belt 5th Degree
Posts: 5791
Joined: Fri Apr 11, 2003 5:59 pm
Location: Leeds, UK

Postby evasive » Sun Nov 27, 2005 1:48 pm

Uggggh. Ugly written VB.
We hate rut, but we fear change.
System error, strike any user to continue...
Mobo-fu Master
Mobo-fu Master
Posts: 37454
Joined: Sun May 06, 2001 12:01 am
Location: Netherlands

Postby olly » Mon Nov 28, 2005 11:18 am

This is a good VB site
Green Belt
Green Belt
Posts: 222
Joined: Thu Jun 27, 2002 8:11 pm

Return to Programming

Who is online

Users browsing this forum: AhrefsBot [Bot] and 1 guest