[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Editing many Include files



PureBytes Links

Trading Reference Links

Title: Re: [amibroker] Editing many Include files

Dennis,


This is a common problem and text substitutions do not work well across a large number of files. It is not just a matter of finding a good text-replacement program. Without exception they will start replacing substrings in other variables/text that should not be replaced. Then, unless you made a recent backup you can spend hours trying to get things working again. All this is especially true if your code isn't broken up into functions and procedures. I try to use more functions, the scope of variable names inside functions can be made local and, once a function is completely tested one can forget what was inside, and then give the function a good descriptive name. 


A common reason for having to rename variables is that instead of adding lots of space-consuming comments I prefer to use descriptive variable names. Even if the names get quite long this makes code easier to read, without having to scroll to reach comment blocks or read comments attached to every line. afaik long names do not slow down execution. This type of naming convention makes me change variable names often to make their use more clear.


herman


Thursday, February 19, 2009, 11:46:48 PM, you wrote:


> Hello,


> I have my system broken into about 30 include files now.  Now I must

> get around a problem that is one of the reasons I resisted using many

> includes for so long --editing the same content across all includes.


> Let's say that I decide I want to change the name of a variable to a

> more descriptive name -- like RibSel to RibSelMenuOpen.  If everything

> is one file, I just search and replace every one.  However, if the

> locations are spread across some unknown number of my include files,

> how do I manage to do this operation simply?


> The task is made harder because the formula editor search dialog data

> does not transfer to another open formula editor file.  Currently I am

> finding myself opening each include and pasting the search name over

> again, and typing in the changed name again.  Very time consuming

> considering how many variables I change the names of after I get

> something working.  I make something work with short names then clean

> up the final code with self documenting names when I can think of a

> better name.


> How do others solve this problem?


> Best regards,

> Dennis




> ------------------------------------


> **** IMPORTANT PLEASE READ ****

> This group is for the discussion between users only.

> This is *NOT* technical support channel.


> TO GET TECHNICAL SUPPORT send an e-mail directly to 

> SUPPORT {at} amibroker.com


> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at

> http://www.amibroker.com/feedback/

> (submissions sent via other channels won't be considered)


> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:

> http://www.amibroker.com/devlog/


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-digest@xxxxxxxxxxxxxxx 

>     mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx


> <*> To unsubscribe from this group, send an email to:

>     amibroker-unsubscribe@xxxxxxxxxxxxxxx


> <*> Your use of Yahoo! Groups is subject to:

>     http://docs.yahoo.com/info/terms/





__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___