Just wanna share my code that extracts only numbers, alphabets from a string using regex. Irrelevant character will be ignored. Maybe there is a neater code function cExtractAlphabets(cStr) local a_ := hb_regexAll("[A-Za-z ]", cStr), cRet := "", aChar if ...
... ADel( :aControls, 10, .t. ) :BtnAdjust() END return nil > Cool! Way-way neater than what I had in mind. Thanks a bunch Rao Where do I place the code? At every report or just need to call them once from the main prg?
... result back. If the result is ever only going to be displayed you could pass it back in a single string. You could use an array, a hash would be neater. A better way would probably be to pass by reference nYears := 0nMonths := 0nDays := 0CalculateAge( dBirth, Date(), @nYears, @nMonths, ...
... to what functions are or are not available if they are not called specifically in the program but maybe used in a codeblock or macro and what is a neater way to get the linker to include them than insert dummy lines of code into one's program. Up until now I had thought that all standard function ...
... try this and see if you are still getting errors ? VALID ( oBrw:lCreated := .f., oRs:Close(), .t. ) If this works we can suggest a neater modification to XBrowse. Note: If oBrw:lCrated is false, XBrowse does not paint. I have a hunch that this should work. If you still continue ...
I find it cleaner and neater to code it this way: @ 01,10 get oCpo var nCpo pict '9999' of oDlg when lWhen1 valid xFunc(oDlg, oCpo) . . FUNCTION xFunc(oDlg, oGet) MSGINFO('Testing...') lWhen2=.F. ...
http://img66.imageshack.us/img66/2473/screenshotcalendar1yf2.png work in progress but now has slightly neater code and code to increment by any number of months (forward or backwards) and the same for years. That code looks slightly complicated but its to allow for ...
... is not ideal in that it depends upon the programmer updating the cargo value whenever the length of the array has altered. If there isn't a neater approach adding a new DATA to TBROWSE to hold this value would presumably be preferable. Your thoughts would be appreciated Regards Doug (xProgrammer)
... to use CLASSDATA if you ever only instantiate one instance of the class. You could of course use a PUBLIC variable(s) - but using a CLASS would be neater in my opinion. The above of course assumes that you don't need to stop the user starting up a second instance of your software and being in the ...
Hi Being a Linux person these days I can't really help on the GUI side but it might be neater and quicker to use aule->l_mer[3] in place of SubStr(aule->l_mer, 3, 1) and given that you have a series of them look at using (nested) FOR EACHs and ...
... maps to type "D" (length 8, decimals 0). xCHAR is just my single cahracter type - ie shorthand for type "C" length 1 decimals 0. I think its a lot neater and what's more a lot less to type! This post is getting a bit too long so just a bit about documenting code for now. xBase code should be very ...
... Do you want to run the compiled code? [Y/n]: read yesno if test $yesno = "Y" then ./$1 fi if test $yesno = "y" then ./$1 fi There's probably a neater way to test for Y or y rather than do 2 tests, but just looking quickly I didn't spot it. Also you could probably do something smarter with exit ...