Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 <%option explicit%>
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

brkonthru
Development Team Member

Jordan
69 Posts

Posted - 14 September 2000 :  18:29:46  Show Profile  Send brkonthru an ICQ Message
I like to inforce option explicit all over my site so that trouble shooting would be easier and also for the increase in the performance . So when I forced option explicit on these forums, I had to dim these variables, I thought sharing them might be helpfull for people who want to do the same thing.

dim my_conn, strSql, rsConfig, strYAHOO, strBadWordFilter, strRankAdmin, strRankMod, strRankColorAdmin, strRankColorMod
dim strRankColor0 , strRankColor4, strRankColor5, rsCheck, mLev, rs1, Users, Topics, Posts, rs, rsForum, chkDisplayHeader
dim rsAccess, rsChk, nRefreshTime, lastDate, currForum, fDisplayCount, rsCStatus, rsFStatus, rsStatus, rsCat, iNewCat
dim iOldCat, mypage, mypagesize, nDays, defDate, maxpages, rec, Msg, btn, strAuthor, fOTagPos, fCTagPos, TxtSub
dim TxtMsg, boolTopic, Name, Password, RequestMethod, dbRs, boolReply, strI, CColor, hottopic, rsTStatus
dim mySQL, SQLtemp, i, Member_Level, maxrecs, howmanyrecs, Smiles, Err_Msg, Star_Level, rsUsrName, MEMBER_ID
dim usr, rsIP, IP, Title, keywords, keycnt, word, cnt, currTopic, TxtUrl, txtMessage, rsGetMemberID, fMods, key

dim ok, member, txtSubject, RF, objNewMail, strRecipients, strMessage, rsSig, TF, aryForum, rsReply, rsTopicAuthor, MailSendToAuthor, strRecipientsName, strSubject
dim prevMember, bwords, oTag2, c1Tag2, strTempString, oTagPos2, c1TagPos2, pge, scriptname
dim Counter, ref, top

Please remember that these are probably NOT all of the variables that are being used in the forum. These are valid for ver 3.0, probably quite a few variables have been added since that version. So please debug your forum after you inforce the option explicit.

dcwebman
Junior Member

USA
105 Posts

Posted - 14 September 2000 :  19:31:02  Show Profile  Visit dcwebman's Homepage
I agree, OPTION EXPLICIT should be turned on.

-----------
Jeff
Go to Top of Page

HeLD
Starting Member

Switzerland
14 Posts

Posted - 16 September 2000 :  05:34:38  Show Profile  Visit HeLD's Homepage
absolutely. another thing that should be cleared: call by values (byval) & call by reference function declarations.
the current functions all use call by reference. this may generate serious side-effects!
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 16 September 2000 :  11:21:28  Show Profile
What are some of the serious side-effects of passing variables by reference? Maybe you could elaborate a little.

======
Doug G
======
Go to Top of Page

glauco
Starting Member

6 Posts

Posted - 27 September 2000 :  10:43:19  Show Profile
All my asp pages use option explicit, thus it would be really appreciable if snitz code used all dimmed variables. I hope this will be one of the next updates.

Thanks a lot to brkonthru for the variable list!
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 27 September 2000 :  13:23:49  Show Profile  Visit gor's Homepage
I aggree that Option Explicit is something we need.
But it isn't as easy as brkonthru suggest: i.e. in config.asp there are a lot of functions that use global variables as local variable (strSql is one of them), same goes for a lot of the functions in the different pages. Just adding the dims to config.asp makes the error message go away but doesn't fix the "real" problem.

It won't be in the next beta because if this, but will also not be forgotten.

<b>Pierre Gorissen</b>

<font color=blue><font size=1>Experience is that marvelous thing
that enables you to recognize a mistake when you make it again.
</font id=blue></font id=size1><font size=1><font color=black>F.P.Jones</font id=size1></font id=black>
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07