Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bug / feature in input "", var?
#1
try running this code in both qb and fb:

Code:
input "",a$
print a$
line input a$
print a$

enter something with spaces for both prompts. notice the difference?
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply
#2
hmm, maybe i'm the only one getting the problem... i retried with version 0.11b, and the bug remains. here's what i'm doing:
Quote:print "text:"
input "?",text$
print text$;"... huh?"
while inkey$="":sleep 100:wend
and the console output:
Code:
text:
?something or other
something... huh?

obviously, fbc is using a function similar to c's scanf("%s",string); , which also stops inputting to a string after it encounters the first space. it's odd that line input doesn't display this property, though.
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply
#3
Yeah, it's on purpose, qb has 2 different behaves, depending on if inputing from files or console, fb acts the same way on both -- stopping at white-spaces to separate the items read.

Angelo said he may change it, i won't do it myself, sorry.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)