About varocarbas.com

--

About me

--

Contact me

--

Visit customsolvers.com, another side of my work

--

Valid markup

--

Valid CSS

--

© 2015-2017 Alvaro Carballo Garcia

--

URL friendly

--

Optimised for 1920x1080 - Proudly mobile unfriendly

R&D projects RSS feed

All projects in full-screen mode

PDFs:

Project 10

Project 9

Project 8

FlexibleParser code analysis:

UnitParser

NumberParser

Tools:

Chromatic encryption

(v. 1.3)

Pages in customsolvers.com:

Upcoming additions

Failed projects

Active crawling bots:

Ranking type 2

(
)

FlexibleParser raw data:

Unit conversion (UnitParser)

Compound types (UnitParser)

Timezones (DateParser)

Currently active or soon to be updated:

Domain ranking

FlexibleParser (DateParser)

NO NEW PROJECTS:
Project 10 is expected to be the last formal project of varocarbas.com. I will continue using this site as my main self-promotional R&D-focused online resource, but by relying on other more adequate formats like domain ranking.
Note that the last versions of all the successfully completed projects (5 to 10) will always be available.
Completed (24 days)
Completed (57 days)
Completed (26 days)
Completed (47 days)
Completed (19 days)
Completed (14 days)

Introduction >

FlexibleParser
NumberParser code >
NumberX
NumberX is the generic designation for the following four basic classes of NumberParser:
  • Number. The most simple and efficient one. It is decimal-based.
  • NumberD. Similar to Number, but capable to deal with any numeric type via dynamic.
  • NumberO. It manages different numeric types simultaneously. The code of its specific functionalities is being analysed in the next section.
  • NumberP. It parses strings into numeric types. There is one section analysing its specific code.
All NumberX have the following public fields in common:
  • Value. Main numeric information of the given variable. Its type can be either decimal or dynamic (i.e., any supported numeric type).
  • BaseTenExponent. Exponent of the base-ten factor which complements Value when required (i.e., being outside the range of the corresponding numeric type). For example, Value 6 and BaseTenExponent 3 equals 6*10^3 or 6000.
  • Error. An ErrorTypesNumber variable telling the user about any error, which is managed internally without raising exceptions.
All NumberX have also the following features in common:
  • Custom overloaded functionalities.
    • Arithmetic operators. Number number = new Number(1m) + 2m;
    • Comparison operators. if (new NumberO(1m) < 2m) { //This condition is true. }
    • Implicit conversions between each other. Number number = new NumberD(1);
    • Implicit conversions of related types. NumberP numberP = "1.2";
  • Custom arithmetic operations accounting for their basic Value-BaseTenExponent-Error structure and managing all the errors internally (i.e., never raising exceptions).
    Most of this code is included in Operations_Private_Managed.cs. The contents of this file are very similar to the ones of UnitParser's Operations_Private_Managed.cs and, consequently, the explanations in the corresponding UnitParser section are somehow applicable here too.