InputBuffer.IsDecimal - YiZhang-Paul/Mock_Up_Calculator GitHub Wiki
Namespace: UtilityClassLibrary
Description: Indicates if the buffer holds a decimal value.
Returns | Description |
---|---|
bool | true when buffer holds a decimal value |
Remarks:
Buffer with content "5.8" and "5." are both considered decimal due to the existence of decimal point, not based on the actual value they parse into (the latter one will parse into value of 5 which is NOT decimal). The goal is to accurately track the internal state of buffer to avoid subtle bugs later on (for instance, prevent another decimal from being added to buffer when buffer's value is "5.", making it "5..").