Normal Topic Adding to sbasic_include.sbas (Read 1294 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Adding to sbasic_include.sbas
Aug 10th, 2007 at 4:05pm
Print Post Print Post  
I currently have 2 Include files.  One is sbasic_include.sbas and the other contains a subroutine that Ray and Carl wrote to capitalize the initial letters of words entered in an element, cuInitialCaps_include.sbas.

Can I combine these two?  If so, can I just transplant the entirety of cuInitialCaps_include.sbas into sbasic_include.sbas?  If so, would its contents need to come before or after the #defines in sbasic_include.sbas?
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Adding to sbasic_include.sbas
Reply #1 - Aug 10th, 2007 at 4:30pm
Print Post Print Post  
Yes, you can combine them. Put any running code after defines and such. Or, you can just include them both - include the running code after the one with the defines. You may be able to include one from the other - I'm not sure.

Also, if you want faster compile times, you can edit (copies!) of the files to only include those defines that you are using.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Adding to sbasic_include.sbas
Reply #2 - Aug 10th, 2007 at 4:33pm
Print Post Print Post  
You could combine them, but I think many of us are keeping our own codes out the file provided by Lantica.  This is in case they provide a newer/modified file in the future, that could overwrite the changes we had made to it. 

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Adding to sbasic_include.sbas
Reply #3 - Aug 10th, 2007 at 4:42pm
Print Post Print Post  
Quote:
if you want faster compile times,

Yes, always a desire.  Have I mentioned how much I love just-in-time compilation lately?

Quote:
you can edit (copies!) of the files to only include those defines that you are using.

But this would be hard to determine, so I sacrifice a little compiling time.

Quote:
You could combine them, but I think many of us are keeping our own codes out the file provided by Lantica.  This is in case they provide a newer/modified file in the future, that could overwrite the changes we had made to it. 

This is a consideration, but I think that it would be fairly easy to just cut&paste the entire contents of their revised file into my combined file, and the convenience of just working with a single file (ease of distribution, no need to edit existing #include programming, no need to kick users off in order to reconcile, etc.) makes the ides of a combined file attractive.

Thanks for the advice, guys.
  

**
Captain Infinity
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Adding to sbasic_include.sbas
Reply #4 - Aug 10th, 2007 at 4:44pm
Print Post Print Post  

Wow fast responses, by the time I typed (answerd a phone call) and pressed post a lot had been said.



Infinity,

Many of us use 2 files

sbasic_include.sbas
mystuff_include.sbas

we keep all the stuff we create for ourselves in mystuff_include.sbas

when the lanticans make changes and additions to the sbasic_include.sbas you will not need to figure out what to add to the existing. You will be able to replace the entire file and not loose the stuff you created.

Mark, Erika, or Ray can probably tell us if this is not a good technique for some other reason, but it would seem to simplify updating.


  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Adding to sbasic_include.sbas
Reply #5 - Aug 10th, 2007 at 4:44pm
Print Post Print Post  
Quote:
Or, you can just include them both - include the running code after the one with the defines. You may be able to include one from the other - I'm not sure.

This is interesting, and I overlooked it when I first read your reply.  Are you suggesting I put an #Include statement into sbasic_include.sbas that refers to the other .sbas file?  Would that actually work?
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Adding to sbasic_include.sbas
Reply #6 - Aug 10th, 2007 at 5:10pm
Print Post Print Post  
I would actually suggest several files for custom functions not just one big one. Name them something descriptive such as

MyFormattingFunctions.sbas
MyPrintingRoutines.sbas
MyTrigFunctions.sbas
MyDancingMonkey.sbas

This way if you are working in say a report or a subform and you only need that one function that does the formatting of Money just the way you want it, you only have to include one smaller file rather than one large file. Compile times will be faster and in turn the report will run faster.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Adding to sbasic_include.sbas
Reply #7 - Aug 10th, 2007 at 5:10pm
Print Post Print Post  
BOBSCOTT wrote on Aug 10th, 2007 at 4:44pm:
Wow fast responses, by the time I typed (answerd a phone call) and pressed post a lot had been said.



Infinity,

Many of us use 2 files

sbasic_include.sbas
mystuff_include.sbas

we keep all the stuff we create for ourselves in mystuff_include.sbas

when the lanticans make changes and additions to the sbasic_include.sbas you will not need to figure out what to add to the existing. You will be able to replace the entire file and not loose the stuff you created.

Mark, Erika, or Ray can probably tell us if this is not a good technique for some other reason, but it would seem to simplify updating.




That is probably the best way.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Adding to sbasic_include.sbas
Reply #8 - Aug 10th, 2007 at 5:31pm
Print Post Print Post  
Thanks again for the advice guys, I'll stick with multiple files for the reasons stated.

And Ray, please send me that code for the dancing monkey.   Grin
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Adding to sbasic_include.sbas
Reply #9 - Aug 10th, 2007 at 5:42pm
Print Post Print Post  
Infinity wrote on Aug 10th, 2007 at 5:31pm:
And Ray, please send me that code for the dancing monkey.   Grin


Ah, You can't handle the Dancing Monkey.  Grin

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged