4DToday.com
4D Summit 2009
Home Directory Classifieds Reference Archives
Site Info
About 4DToday.com
Contact Us
Version française
Quote
Developers (709)
4D Developers (585)
Web Developers (330)
Tools Publishers (192)
Instructors (164)
Web Hosts (56)
Resellers (82)
Software Publishers (292)
Search Developers
Products (419)
Plug-Ins (123)
Components (62)
Code Libraries (9)
Books (7)
Tools (42)
Vertical Applications (147)
Search Products
User Groups
All User Groups (21)
Classified Ads (6)
Help Wanted (0)
Opportunities Wanted (4)
Hardware Wanted (0)
Hardware for Sale (0)
Software Wanted (1)
Software for Sale (1)
Other (0)
Resources
4D
4D, Inc.
4D International
4D Wiki
4D Partner Central
4D Beginner's Center
4D Online Documentation
4D 2004 Example Applications
4D v11 SQL Examples
4D BugDisplayer
4D, Inc. Training
Message Lists
4D Mailing Lists
4D Bulletin Board
4D Tech Google Group
iNUG Archives (Nabble)
iNUG Archives (Gmane)
iNUG Message Index
Other
4D Code Exchange
4D Resources
Sviluppo4D.it (Italy)
Quote
Stupid people surround themselves with smart people. Smart people surround themselves with smart people who disagree with them.
Isaac Jaffe, Sports Night  
  Suggest a Quote  
Developer News
Weekly Tech Tips Posted
The weekly tech tips have been posted to the 4D, Inc. Web site. Some of the subjects this week include "Database Performance and Flushing Buffers" and  "Adding the 'Shaking window to say No' effect." 12:00 AM PST
New 4D Tech Note Posted
This week's Technical Note "How to Save and Restore 4D Hierarchical Lists" is now available to 4D Partners. 12:00 AM PST
4D, Inc. Closed July 3rd for the Holiday
4D, Inc. will be closed on Friday, July 3rd, in observance of Independence Day. 9:30 AM PST
 Submit Future News    Archive 
Technical Tip
Increment Routine
Submitted by Tom Dillon, DataCraft

Here's a helpful method for incrementing a number in 4D. Rather than hard-coding numbers when adding elements to an array, use the Inc (as in "increment" function below. So instead of this:

ARRAY TEXT(aRay;3)
aRay{1}:="Regular"
aRay{2}:="Ethyl"
aRay{3}:="Fred"

You can now do this:

ARRAY TEXT(aRay;3)
Inc(0)  ` Reset the counter to 1.
aRay{Inc}:="Regular"
aRay{Inc}:="Ethyl"
aRay{Inc}:="Fred"

This is especially useful if you need to do a lot of subscripted assignments where you might need to do insertions or change the order.

` Inc
` Returns the next number in a series.
` With no parameters, this returns one more than the last number.
` Passing a number increments by that much.
` Passing zero resets the returned number.

C_LONGINT(vIncrementalValue;$Inc;$1)

If (Count parameters>=1)
  $Inc:=$1
Else
  $Inc:=1
End if

If ($Inc#0)
  vIncrementalValue:=vIncrementalValue+$Inc
Else
  vIncrementalValue:=0
End if

$0:=vIncrementalValue
  Submit a Tip    Archive 
Spotlight
Eclipse Service Management Software
Eclipse Service Management Software Eclipse Service Management Software is a 4D based solution that handles the operational functions for service based organizations. Developed by TechSolutions, Eclipse handles service call management, labor efforts, parts consumed, knowledge management, billing, marketing, management reporting, and much more.
  Suggest a Spotlight  
Survey Question
Today, we ask you...
Do you use the DEFAULT TABLE command?
Yes
No


Mac OS X Users: Unfortunately the Leopard 10.5.6 update has broken the 4DToday.com survey for Safari users. We apologize for the inconvenience and hope to have a solution available soon.
  Show Results (no vote)    Suggest a Survey  
Events
There are no events scheduled for the upcoming week.
  Submit an Event