FuryCell Posted July 2, 2005 Share Posted July 2, 2005 (edited) I created this UDF after looking through my Computer Desktop Enclopeda when i found this article. (I can't link to it just look up picture at )http://www.computerlanguage.com/webexamples.htm(I have the stand-alone version but its in the web version too.)The UDF takes a number and formats it how you want it.For example: _Picture("(999)999-9999",2152971234) would return (215)297-1234.Here is the header:CODERemovedPlease let me know what you think.Old version removed.Scroll down for the new version. Edited December 12, 2006 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
busysignal Posted July 5, 2005 Share Posted July 5, 2005 Interesting... Kind of reminds me of COBOL. Why is this? Nice error checking.. I will have to look into it further... Thx! Cheers.. Link to comment Share on other sites More sharing options...
FuryCell Posted July 6, 2005 Author Share Posted July 6, 2005 Interesting... Kind of reminds me of COBOL. Why is this? Nice error checking..I will have to look into it further... Thx!Cheers.. <{POST_SNAPBACK}>Thanks for the Feedback. I have never used COBOL but I know it stands For Common Bussiness Orenented Laungauge. Do you know where I can download a free version of COBOL. I would like to see what it is like even though it is probably horribly outdated. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
busysignal Posted July 7, 2005 Share Posted July 7, 2005 Thanks for the Feedback. I have never used COBOL but I know it stands For Common Bussiness Orenented Laungauge. Do you know where I can download a free version of COBOL. I would like to see what it is like even though it is probably horribly outdated. <{POST_SNAPBACK}>COBOL is not out-dated, sad to say. It is used in the world of banking so where there is money???? Here are some COBOL links to check out:Tiny Cobol - Sourceforge.netListing of Cobol sites & CompilersCobol for GCC - Sourceforge.netFreebyte Cobol GoodiesYou will like this site most of all it has some of the above links but a lot more.. Free Programmers ResourceBased on these links COBOL is still alive and kicking. Why you may ask? I cannot answer that question. It did have some really nice aspect when I used to use it. I have not check out any improvements it may have now days.Have fun. If you learn something from all this, please share it.. Cheers.. Link to comment Share on other sites More sharing options...
BlindWanderer Posted July 8, 2005 Share Posted July 8, 2005 (edited) *gets out COBAL manual printed before his birth* umm yeah exactly like the COBAL PICTURE, except it doesn't support all of the features. why not write a sprintf function (or do we have one, not really interested just asking)? I keep the COBAL manual because it has great pictures of historical computer machinary, like cylinder drives, core memory, bunch card machines. Edited July 8, 2005 by BlindWanderer Link to comment Share on other sites More sharing options...
FuryCell Posted July 9, 2005 Author Share Posted July 9, 2005 *gets out COBAL manual printed before his birth*umm yeah exactly like the COBAL PICTURE, except it doesn't support all of the features.why not write a sprintf function (or do we have one, not really interested just asking)?I keep the COBAL manual because it has great pictures of historical computer machinary, like cylinder drives, core memory, bunch card machines.<{POST_SNAPBACK}>Never used COBOL but maybe you could tell what extra features its Picture fucntion had and I can try to add them.Thanks for the Feedback-SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
FuryCell Posted July 9, 2005 Author Share Posted July 9, 2005 (edited) COBOL is not out-dated, sad to say. It is used in the world of banking so where there is money???? Here are some COBOL links to check out:Tiny Cobol - Sourceforge.netListing of Cobol sites & CompilersCobol for GCC - Sourceforge.netFreebyte Cobol GoodiesYou will like this site most of all it has some of the above links but a lot more.. Free Programmers ResourceBased on these links COBOL is still alive and kicking. Why you may ask? I cannot answer that question. It did have some really nice aspect when I used to use it. I have not check out any improvements it may have now days.Thanks I Will have to try these out especally to get more info about picture so i can add more features like Blind Wanderer said it had in COBOL.Thanks. P.S. I can't belive COBOL is still used. I thought they stopped using it in the late eighties. LOL Have fun. If you learn something from all this, please share it.. Cheers.. <{POST_SNAPBACK}>Thanks will have to check those out. Edited July 12, 2005 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
BlindWanderer Posted July 12, 2005 Share Posted July 12, 2005 http://publib.boulder.ibm.com/infocenter/i...c/hplmst353.htmhttp://publib.boulder.ibm.com/infocenter/i...c/hplmst354.htmhttp://publib.boulder.ibm.com/infocenter/i...c/hplmst355.htm Link to comment Share on other sites More sharing options...
FuryCell Posted July 12, 2005 Author Share Posted July 12, 2005 (edited) http://publib.boulder.ibm.com/infocenter/i...c/hplmst353.htmhttp://publib.boulder.ibm.com/infocenter/i...c/hplmst354.htmhttp://publib.boulder.ibm.com/infocenter/i...c/hplmst355.htm<{POST_SNAPBACK}>Thanks. will try to update my UDF to reflect those features. Edited July 12, 2005 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
FuryCell Posted July 12, 2005 Author Share Posted July 12, 2005 (edited) The new version is done. Here is the header:CODE;===============================================================================; ; Description: Formats a string according to the way specified by $sPicture; Syntax: _Picture($sPicture, $sString2Format, $sAPriority = "DL", $sXPriority = "DLC");; Parameter(s): $sPicture = The picture to use for formatting the string. See notes for details.; $iNumber = The string to be formatted.;;;; Requirement(s): None; Return Value(s): On Success - Returns a string representation of $iNumber formatted according to $sPicture; On Failure - Returns an empty string "" if no files are found and sets @Error on errors; @Error=1 $sPicture length is zero; @Error=2 $sString2Format length is zero; @Error=3 $sAPriority is invalid (must have a length of 2 and contain both an N and an L); @Error=4 $sXPriority is invalid (must have a length of 3 and contain an N , an L , and a C); @Error=5 More digit requests in $sPicture than digits in $sString2Format; @Error=6 More letter requests in $sPicture than digits in $sString2Format; @Error=7 "a" request failed because no more letters or digits were available; @Error=8 "X" request failed because no more letters, digits, or numbers were available; Author(s): SolidSnake <MetalGX91 at GMail dot com>; ; Note(s): a capital A in $sPicture would be replaced with a numeric character from $sString2Format; a lowercase a in $sPicture would be replaced with an alphanumeric character from $sString2Format in the precedence specified by $iAPriority; an uppercase X in $sPicture would be replaced with an any character from $sString2Format in the precedence specified by $iXPriority; a C in $sPicture would be replaced by a nonalphanumeric character from $sString2Format; a slash / specified that the next character is to be taken literally and not to be replaced.; For example _Picture("AAAC999","123ABC-") would return ABC-123; Version : 2.0;===============================================================================Edit:Added a version number so it won't be confused with the older version.Edit:Changed header to reflect my new email address. (Previous downloads 108)PictureExample.au3PictureUDF.au3 Edited December 12, 2006 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
busysignal Posted July 12, 2005 Share Posted July 12, 2005 The new version is done. <{POST_SNAPBACK}>Thanks for the new post. I will give it a try. Also, just as a note that you should add version numbers to your fuctions. ;-) It could be easily mistaken for your older function.Just a thought.. Cheer.. Link to comment Share on other sites More sharing options...
FuryCell Posted July 12, 2005 Author Share Posted July 12, 2005 (edited) Thanks for the new post. I will give it a try. Also, just as a note that you should add version numbers to your fuctions. ;-) It could be easily mistaken for your older function.Just a thought.. Cheer.. <{POST_SNAPBACK}>Thanks for the feedback.Will add a version number to my UDF.Edit:Done... I added a version number to my UDF. Edited July 12, 2005 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
busysignal Posted July 16, 2005 Share Posted July 16, 2005 So, after you get done reviewing the COBOL _Picture function it would be great to see what functionality you have added. Cheers Link to comment Share on other sites More sharing options...
FuryCell Posted July 17, 2005 Author Share Posted July 17, 2005 (edited) So, after you get done reviewing the COBOL _Picture function it would be great to see what functionality you have added.Cheers <{POST_SNAPBACK}>Yeah. Right now it is is similar alphanumeric picture. I plan to add date picture and Number picture too. I think I might make The Alphanumeric and Numeric into one UDF but the date one will be a seperate UDF.Thanks for the feedback. -SolidSnake Edited July 17, 2005 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
busysignal Posted July 19, 2005 Share Posted July 19, 2005 Yeah. Right now it is is similar alphanumeric picture. I plan to add date picture and Number picture too. I think I might make The Alphanumeric and Numeric into one UDF but the date one will be a seperate UDF.Thanks for the feedback. -SolidSnake<{POST_SNAPBACK}>I like your . Can wait to see what you come up with.. Cheers.. Link to comment Share on other sites More sharing options...
cappy2112 Posted January 5, 2006 Share Posted January 5, 2006 I created this UDF after looking through my Computer Desktop Enclopeda when i found this article. (I can't link to it just look up picture at )http://www.computerlanguage.com/webexamples.htm (I have the stand-alone version but its in the web version too.) The UDF takes a number and formats it how you want it. For example: _Picture("(999)999-9999",2152971234) would return (215)297-1234. I think it's a very misleading name,even though the feature is useful. It implies some sort of graphics feature Why not use a name that tells you what it does, like Format(), printf(), etc ?? Link to comment Share on other sites More sharing options...
FuryCell Posted January 5, 2006 Author Share Posted January 5, 2006 (edited) I think it's a very misleading name,even though the feature is useful. It implies some sort of graphics featureWhy not use a name that tells you what it does, like Format(), printf(), etc ??In COBOL and possibly some other langauges it also called Picture and I was just following the way other languages name it.Thanks for the feedback. Edited January 5, 2006 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
JSThePatriot Posted January 6, 2006 Share Posted January 6, 2006 Excellent work SolidSnake. I too was confused by the name, but I understood as soon as I saw the function. I havent messed with many other languages that have such a function, but I see where the idea came from. Excellent work. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
FuryCell Posted January 6, 2006 Author Share Posted January 6, 2006 Excellent work SolidSnake. I too was confused by the name, but I understood as soon as I saw the function. I havent messed with many other languages that have such a function, but I see where the idea came from. Excellent work.JSThanks for the feedback.Glad you liked the UDF. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now