User Tools

Site Tools


compiler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
compiler [2019/07/08 16:51]
admin [GetJsonValue]
compiler [2020/07/02 13:09] (current)
admin [SingleToStr]
Line 1367: Line 1367:
  
 **This is the code behind the function call** **This is the code behind the function call**
 +
 <code> <code>
 +//converts a single (i.e. 0.023) to a four byte float string
 Sub SingleToStr(FloatVal as single) as String Sub SingleToStr(FloatVal as single) as String
- 
-//converts a single (i.e. 0.023) to a four byte float string 
  
 Dim mb As MemoryBlock = New MemoryBlock(4) Dim mb As MemoryBlock = New MemoryBlock(4)
Line 1386: Line 1386:
  
 ---- ----
 +==== SingleMBtoString====
 +<code>
 +//converts a four byte single (i.e. 0.023) to a string
  
 +Dim mb As MemoryBlock = New MemoryBlock(4)
 +dim stmp as string
 +dim s as single
 +
 +#if TargetLinux Then mb.LittleEndian = true
 +
 +mb = midB(FloatVal,4,1)+midB(FloatVal,3,1)+midB(FloatVal,2,1)+midB(FloatVal,1,1)
 +s = mb.SingleValue(0)
 +stmp = s.ToString
 +
 +
 +return stmp
 +</code>
 +----
  
 ==== Sqrt ==== ==== Sqrt ====
compiler.1562597491.txt.gz ยท Last modified: 2019/07/08 16:51 by admin