I'd like to see real string functions such as Str, Left, Right, Mid and Instr (or Pos) rather than having to call subprograms. Here's a difference: Now, to create a string such as "You guessed it in 4 tries!" where the number 4 comes from a variable, g, you have to do this:
4->g
ExpToStr g,f
StrJoin "You guessed it in ",f,f
StrJoin f," tries!",f
Print f
With string functions you could do this:
4->ng
Print "You guessed it in " & Str(g) & " tries!"
Tom Lake
New String Functions
Started by
TomL_12953
, Nov 30 2003 11:44 AM
3 replies to this topic
#1
Posted 30 November 2003 - 11:44 AM
#2
Posted 30 November 2003 - 12:05 PM
or like in C++ :
cout<<"you did it in"<
cout<<"you did it in"<
#3
Posted 01 December 2003 - 03:53 AM
dont we all...
I'm setting up a standard library of functions that people will be able to use, feel free to contribute anything.
so far I've made:
printf (prints formated text)
printl (prints out a list with or with out 1)...n) prefix, uses printf)
waitkey
waitpen
poscreen (sets up the screen as you want it)
debug (lets you change and see values of variables)
isdef (does the variable exist)
require (makes sure a variable exists, breaks if not found with a error message)
insmat (using the 2D list method stores a item into a matrix)
getmat (retreives data from a 2D list)
functions planned:
checkver (checks the current version of the library aginst the one you made the program with)
enqueue
dequeue
push
pop
error (error output)
if you want to make some functions for this library that would be great, people can put it in the "library" folder and it will be able to be accessed by all programs.
I'm setting up a standard library of functions that people will be able to use, feel free to contribute anything.
so far I've made:
printf (prints formated text)
printl (prints out a list with or with out 1)...n) prefix, uses printf)
waitkey
waitpen
poscreen (sets up the screen as you want it)
debug (lets you change and see values of variables)
isdef (does the variable exist)
require (makes sure a variable exists, breaks if not found with a error message)
insmat (using the 2D list method stores a item into a matrix)
getmat (retreives data from a 2D list)
functions planned:
checkver (checks the current version of the library aginst the one you made the program with)
enqueue
dequeue
push
pop
error (error output)
if you want to make some functions for this library that would be great, people can put it in the "library" folder and it will be able to be accessed by all programs.
#4
Posted 01 December 2003 - 08:33 AM
hey good idea !
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users