Paul
Text can actually be stored in three different ways.
Character as its name suggests stores just one character and is therefore of rather limited use and could really be left out of the language.
String is the most useful and most used type for text; it has a maximum limit of 65 535 characters. The third type
Text memo can take a character string up to 4 GB (which should be ample for most purposes!); this is particularly useful for notes because text memos support RTF formatting.
Whether you use strings or text memos, the size is dynamic, ie only the storage space required is used. Add some more text (to either a string or memo) and your file size will increase, and vice versa.
So if you have specified a string with a maximum length of 5000 characters, the user can enter up to 5000 characters (but no more) but if nothing is entered, no space will be used. If you're declaring a variable in your program of string type, then no length is specified (although the 65K limit still applies).
[If you're interfacing your WD with another programming language, then there are some variants of the string type to ensure compatibility with the other language but if it's just a WD application then you only need the standard string or text memo types.]
Numeric vs currency. In the past, I've always stuck with currency for numeric calculations which need to be exact with no rounding off error, typically monetary/financial calculations. My understanding is that WinDev used a form of what used to be called BCD, binary-coded decimal. However, in checking out the Help information in version 11, it seems that the currency type has now been superseded by the
numeric type so obviously numeric is also a BCD type. Simply put, it seems that numeric is the same as currency but with a greater number of digits: currency can contain up to
23 significant digits, 17 for the integer part and 6 for the decimal part, while numeric can have up to
38 significant digits, 32 for the integer part and 6 for the decimal part.
The Help file says that the currency type is kept for backward compatibility which suggests that this may be phased out in some future time in favour of the numeric type. However, given PC Soft's past record of keeping backward compatibility for quite a few versions hence, there's no need to drop currency in a hurry unless you need the extra precision. Although the currency type is faster because of the lower precision, my inclination would be to use the numeric type as this looks to be WinDev's future path.
Hope this is of use.
Chris
Melbourne, Oz