Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The biggest mistake of the season :)
Message
 
 
To
24/05/2006 13:09:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01124333
Message ID:
01124589
Views:
18
>
>local laProblemTxt[5], laProblemFlag[5]
>        * should be in setup code or table driven...
>        * not inited again and again...
>	laProblemTxt[1] = " payment arrangements"
>	laProblemTxt[2] = " recent payments"
>	laProblemTxt[3] = " been recently billed"
>	laProblemTxt[4] = " some process pending"
>	laProblemTxt[5]	= " recent status changes"
>
>        *-- Short and sweet if it is only flags!
>	laProblemFlag = 0
>
>* Processing code
>for lnI = 1 to Alen(laProblemTxt)
>    if laProblemFlag[lnI] > 0
>	.cProblemText = .cProblemText + "," + CRLF + ;
>	transform(laProblemFlag[lnI]) + ;
>	iif(laProblemFlag[lnI] > 1, ;
>	" accounts have", ;
>	" account has") + laProblemTxt[lnI]
>     endif
>next
>if not empty(.cProblemText)
>   .cProblemText = substr(.cProblemText,4) + "."
>endif
>
>why couple the flags and the text in 1 Array ?
>It is easier to code in 2 arrays and lets you decouple the constant text...
>Also independant of later additions to the error state.
>
>regds
>
>thomas

Thanks. Good point, but I think I've done with this program for now <g>

Right now I'm trying to figure out how to make mover class resizable. I'm re-defining one form of my colleague and having a little bit of hard time trying to understand Anchor property and bit operations...
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform