Help: Why i can not use print to output a variable

View: New views
5 Messages — Rating Filter:   Alert me  

Help: Why i can not use print to output a variable

by sky_mrlin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


The code is:

       A=0

       print A

But there is no result in the netbeans console,and there is any error info.Why? Is there anyone know the reason.

Thanks.






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Help: Why i can not use print to output a variable

by emononen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

sky_mrlin wrote:
> The code is:
>
>        A=0
>
>        print A
>
> But there is no result in the netbeans console,and there is any error info.Why? Is there anyone know the reason.
>  

Strange, I don't know now what could be causing this. What platform do
you use? How do you run the file? I guess it works fine if you run the
same file from the command line using the same platform as within the
IDE, right?

Erno


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Help: Why i can not use print to output a variable

by sky_mrlin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks . The IDE is Netbeans 6.5.1 and ruby platform is 1.8.6. It is good to run in other IDE,eg,SciTE.






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Help: Why i can not use print to output a variable

by emononen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I guess this could be an issue with the output window I/O - can you try
whether it works in 6.7 RC3? If not, could you turn on detailed logging
(http://wiki.netbeans.org/FaqRubyNBLogging67) and send the log file to me?

BTW, I assume "puts A" works fine, right? What about print with a line
break?

Thanks,
Erno


sky_mrlin wrote:

> Thanks . The IDE is Netbeans 6.5.1 and ruby platform is 1.8.6. It is good to run in other IDE,eg,SciTE.
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Help: Why i can not use print to output a variable

by sky_mrlin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

   Thanks for your help. 6.7RC3 is OK,it can output the value normally.

   BTW, your assumption is right . It can works fine use "puts" to output a variable in Netbeans 6.5.1 platform.


> I guess this could be an issue with the output window I/O - can you try

> whether it works in 6.7 RC3? If not, could you turn on detailed logging

> (http://wiki.netbeans.org/FaqRubyNBLogging67) and send the log file to me?

>

> BTW, I assume "puts A" works fine, right? What about print with a line

> break?

>







---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...