MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fx_parseFloat

Function fx_parseFloat

xs/sources/xsNumber.c:115–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void fx_parseFloat(txMachine* the)
116{
117 if (mxArgc < 1) {
118 mxResult->value.number = C_NAN;
119 mxResult->kind = XS_NUMBER_KIND;
120 return;
121 }
122 fxToString(the, mxArgv(0));
123 mxResult->kind = XS_NUMBER_KIND;
124 mxResult->value.number = fxStringToNumber(the, mxArgv(0)->value.string, 0);
125}
126
127void fx_parseInt(txMachine* the)
128{

Callers

nothing calls this directly

Calls 2

fxToStringFunction · 0.85
fxStringToNumberFunction · 0.85

Tested by

no test coverage detected