-
- Rate Projections Functions Walkthrough
- Accruals and Cash
- Repeating Formulae
- Range Names and References
- Optional Parameters
- Using PmtsPerYear
- Modelling Seasonality
- Calculating Interest
- Using Business Functions in VBA (Visual Basic for Applications)
- Array Functions
- Volatility
- Annual Equivalent Rates
- Array Function
- Auto Multi Functions
- Variable Plurality
- GoalSeek
Conversion of Input Strings to Values | |
Some input types permit you to enter a string and BF will convert it internally | |
Sometimes, particularly for option type inputs, you want to specify something like "1 Cash" instead of just "1", because its more explanatory for the user. Also, this approach works very well with Data Validation, where you can have a data validation list of something like "0 Accruals, 1 Cash". BF will extract a number from string, yielding 0 and 1 respectively in the above example. The data types that will do this conversion are any numerical input, and this includes ranges and annual sequences. It does NOT include dates, because we have not figured how to inteligently interpret all kinds of date, in all languages. The way the conversion works internally as that, starting from the first numeric character in the string, all the charcaters are saved to an internal buffer until the first non-numeric character. So "1 Cash" will get "1" and also "Cash 1" will get "1". Note also that "(1) Cash" will get "1", not "-1". The code we use to make the actual conversion of the buffer from a string to a number is the Boost Library"s Lexical Cast function. Whenever a conversion froma string to a number is done, the Trace facility will tell you. So if you are suspicious that the conversion has not been done correctly, then you can look here, and if it has been done wrong, please tell us. |