Update StdLib - Remove Pring2Str() - Now Ring 1.17 comes with Pring2Str() written in C code
@@ -16,85 +16,6 @@ Func Puts vvalue
see vvalue
see nl
-/*
- Function Name : print2str
- Usage : print to string - support \n \t \r \\ #{variable}
- Parameters : the string
-*/
-Func Print2Str vValue
- # Pass Three Scopes
- if isnumber(vValue)
- vValue = "" + vValue
- ok
- if isstring(vValue)
- return _Print2Str(vValue,3)
- else
- raise("Type Error : Print2Str() Accept Strings/Numbers Only!")
- ok
-
-/*
- Function Name : _print2str
- Usage : Internal function - print to string
- Parameters : the string , Scopes to pass
-*/
-Func _Print2Str vValue,nScope
- cString = ""
- for t = 1 to len(vValue)
- switch vValue[t]
- on "\"
- t++
- switch vValue[t]
- on "\"
- cString += "\"
- on "n"
- cString += nl
- on "t"
- cString += char(9)
- on "r"
- cString += char(13)
- off
- on "#"
- if vValue[t+1] = "{"
- cVar = ""
- for r=t+2 to len(vValue)
- if vValue[r] != "}"
- cVar += vValue[r]
- else
- exit
- ok
- next
- # Access Local Variables in the Caller
- if not find(globals(),lower(cVar))
- aMem = ringvm_memorylist()
- if len(aMem) > 1
- # -2 to avoid two scopes
- # scope used by ringvm_memorylist()
- # scope used by _print2str()
- aList = aMem[len(aMem)-nScope]
- nPos = find(aList,lower(cVar),1)
- if nPos
- cVar = "aList[nPos][3]"
- ok
- ok
- else
- aMem = ringvm_memorylist()
- aList = aMem[1]
- nPos = find(aList,lower(cVar),1)
- if nPos
- cVar = "aList[nPos][3]"
- ok
- ok
- cCode = "cString += " + cVar
- eval(cCode)
- t = r
- ok
- other
- cString += vValue[t]
- off
- next
- return cString
-
-
/*
Function Name : getstring
Usage : get input using the keyboard
