[Gambas-user] C Code character manipulation - alternatives
KhurramM
kmsuse at ...626...
Thu May 21 04:40:55 CEST 2009
Thanks Sir.
You have given me tips better then the book I am following on C. :working:
My two queries:
1> Can I implement ctrl+D or ^D, which I am not able to here, as in C?
2> The program works with INPUT and LINE INPUT. But Line Input also takes
blank space as input, while INPUT ends the program over here. And I use
string here, but in C it was integer?
--------------------------------------------------- Just for reference:
Well I made my program final as:
PUBLIC SUB Main()
' Declare AND initialize variables.
DIM c, count AS Integer
DIM c1 AS String
' READ , PRINT , AND count characters.
PRINT "Enter characters (or Press Carriage Return to quit): "
LINE INPUT c1
count += Len(c1)
WHILE (c1 <> "") ' This is the best solution
PRINT c1
LINE INPUT c1
count += Len(c1)
WEND
' PRINT the number OF characters printed.
PRINT count & " characters printed."
END
--
View this message in context: http://www.nabble.com/C-Code-character-manipulation---alternatives-tp23611042p23646969.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list