readln and readf issues

Jacob Marek via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 11 03:39:11 PST 2016


On Friday, 11 November 2016 at 10:05:14 UTC, Daniel Kozak wrote:
> Dne 11.11.2016 v 10:43 Jacob Marek via Digitalmars-d napsal(a):
>
>> Hi! so I'm probably being dumb here however I'm having an 
>> issue getting readf and readln to work properly. It seems to 
>> be superseding the rest of my code. Allow me to explain. No 
>> matter where I put the readf/readln function it will get hung 
>> up in the console waiting for input. An example is below where 
>> this occurs (only after inputting an int and pressing enter 
>> does hello print) I am using eclipse with the standard DMD 
>> compiler. Any help is appreciated!
>>
>> void main() {
>>     writeln("hello");
>>     int q;
>>     readf(" %s", &q);
>> }
>>
> http://stackoverflow.com/questions/39165247/order-of-method-invocation-mixed-up

Thank you very much. That link had everything I needed to 
understand and fix the issue!


More information about the Digitalmars-d mailing list