I've been trying, unsuccessfully, to turn off the console echo. Can someone verify that this function is working correctly? Using the code below, I get an echo in Hyperterminal where I shouldn't. I have verified that the echo feature in Hyperterminal is off.
Sub Main()
Do
Register.Console.Echo = False
Dim x as byte
Console.Write("Type Something ")
x = Console.Read
Console.WriteLine("")
Console.WriteLine("You entered " & Chr(X))
Loop
End Sub
Don_Kirby wrote:I've been trying, unsuccessfully, to turn off the console echo.
The code generated for setting Register.Console.Echo is incorrect. You can work around the problem by commenting out the existing code and adding the inline C code as follows:
The code generated for reading Register.Console.Echo in also faulty. Replacement code for it, however, is a bit more complicated. Let me know if you need it, too.
Compiler wrote:RunSetup.bas Error: end-of-file reached with one or more open conditionals
RunSetup.bas Error: expected C statements and #endC following #C
Compiler wrote:RunSetup.bas Error: end-of-file reached with one or more open conditionals
RunSetup.bas Error: expected C statements and #endC following #C
I just pasted the code into my test application and it compiles fine. I get your error messages if the #endc is not on a new line i.e.
Mike, try that test again using indentation and see if you get the error. I'm big on keeping my indentation neat and tidy, so I indented the code after I pasted it. Removing the indentation made the errors go away.
Don_Kirby wrote:try that test again using indentation and see if you get the error.
Currently, the #c, #endc, #asm, and #asm directives must begin in column 1. In retrospect, I don't know why they should not be allowed to be indented given that #if, #else, etc. are.