[Gambas-user] C Code character manipulation - alternatives

KhurramM kmsuse at ...626...
Thu May 21 09:08:15 CEST 2009


The code below works a okay on a console, after I make its exe file.

Currently, I am solcving my C programs into Gambas, in terminal mode only.
Next I will try these in gui. Currently it is my first experience in gui,
but I like basic more than C/C++/Java. It is the first language I started to
learn in my secondary school. Gambas is way ahead of QBASIC, and much
better. Going visual makes it superb.

CODE for reference:
================

PUBLIC SUB Main()

   ' Declare AND initialize variables.
   DIM count AS Integer
   ' The values are initialized at Zero, by above command
   
   DIM c AS String
 
   ' READ , PRINT , AND count characters.
   PRINT "Enter characters (Ctrl+D to quit): "
   LINE INPUT c
   PRINT c
   count += Len(c)
   WHILE NOT Eof      ' This doesnt works
      'PRINT c1
      LINE INPUT c
      count += Len(c)
      PRINT c
   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-tp23611042p23648833.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list