QBasic Tutorial 8 - Select Case Statements - QB64

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ •

  • @SchoolFreeware
    @SchoolFreeware  12 років тому +8

    a$ is a string. 5 is an integer. This causes a type mismatch. Change a$ to an integer a% and remove " " from the numbers to make them an integer also.

    • @oboplays3413
      @oboplays3413 7 років тому +1

      Thanks i was wonedering

    • @ulle85
      @ulle85 Рік тому +1

      are all compiled .exe files from qb64 compatible with native MS-DOS 6.22?

  • @TheJuicyjay7
    @TheJuicyjay7 12 років тому +6

    your videos have helped me so much in high school thank you !!

  • @anushka9994
    @anushka9994 3 роки тому +1

    Helped such a Computer theory hater to get it perfectly inside my head 😃 Thank you School Freeware

  • @theirradiatedgamer1280
    @theirradiatedgamer1280 8 років тому +1

    How would you prevent the user from putting in a different number.

  • @urmilasuthar5053
    @urmilasuthar5053 3 роки тому

    Do qbasic have break and continue statements

  • @Herbarius
    @Herbarius 13 років тому

    This would have been a good opportunity to also introduce the INPUT$ function...
    Also I don't get how your grades work, shouldn't a test-score of 50 be a D- and 49 and less be Fail? ;)

  • @astrosonuhiggs835
    @astrosonuhiggs835 11 років тому +1

    yeah! here is another example. is this right.
    cls
    input "enter the marks of the student"; M%
    select case m%
    case is > = 85
    print "a grade"
    case is >=60
    print "b grade"
    case is >=50
    print "c grade'
    case else
    print "d grade"
    end select
    end

    • @emperoraltonia
      @emperoraltonia 6 років тому

      Good! I made some improvements in it, see how is it!
      CLS
      INPUT "Enter The Marks of The Student"; M
      SELECT CASE M
      CASE IS >= 85
      PRINT "Good! It's A"
      CASE IS >= 60
      PRINT "Not Bad, But it can be better if you work on it!"
      CASE IS >= 50
      PRINT "Meh, Your parents won't be happy"
      CASE IS >= 40
      PRINT "Dude, really bad!"
      CASE IS >= 20
      PRINT "DONUT"
      END SELECT
      END

  • @anirudhshetty9517
    @anirudhshetty9517 3 роки тому

    what is the meaning of print between the statements

    • @evatzug
      @evatzug 2 роки тому

      It's for a newline

  • @LondonWalkability
    @LondonWalkability 13 років тому

    can you show us how to do loops? and if its looped how to put in an exit?

  • @rbjaiswal8575
    @rbjaiswal8575 4 роки тому

    I can't understand ucaae$ please help me

    • @SchoolFreeware
      @SchoolFreeware  4 роки тому +1

      Ucase$ is a function that converts strings to uppercase. By converting the case, and using that case in the program, we remove the case sensitivity of the program. This way "a" is the same as "A".

    • @rbjaiswal8575
      @rbjaiswal8575 4 роки тому

      @@SchoolFreeware thanks sir , now I got it .

  • @zamwam8005
    @zamwam8005 10 років тому

    i understand using case select but i see no purpose for using it when there's if and then statements

    • @canalmaidebao-5197
      @canalmaidebao-5197 6 років тому

      Zam Wam this saves time If you are making a menu for example

    • @BoberBoomMan
      @BoberBoomMan 3 роки тому

      @Tera Oh i get it, so its there so you don't pull a yandredev on your code

  • @bedrock138
    @bedrock138 3 роки тому

    Really Helped me

  • @er0rx
    @er0rx 12 років тому

    Why do i get type mismatch, sorry it's in my language.
    CLS
    INPUT "Upisi ocjenu "; a$
    SELECT CASE a$
    CASE IS >= 5
    PRINT "Odlican"
    CASE "4"
    PRINT "Vrlo dobar"
    CASE "3"
    PRINT "Dobar"
    CASE "2"
    PRINT "Onako"
    CASE "1"
    PRINT "Los"
    CASE ELSE
    PRINT "Ne zajebaji ako hoces da znas ocjenu"
    END SELECT

  • @chiazamdim7841
    @chiazamdim7841 7 років тому

    why do you add
    PRINT
    PRINT

    • @SchoolFreeware
      @SchoolFreeware  7 років тому

      A PRINT is like making a new line (Hitting the Enter Key). PRINT PRINT is like hitting the Enter Key twice.

    • @rachitsardana7292
      @rachitsardana7292 6 років тому

      it is done for seperation of lines

  • @er0rx
    @er0rx 12 років тому

    Okay thanks for help.

  • @evatzug
    @evatzug 2 роки тому

    2:03
    Why just not :
    ------------------------------------------------------
    DIM keyPressed AS STRING
    INPUT "Enter a key : ", keyPressed
    PRINT keyPressed; " was entered"
    ------------------------------------------------------
    ?

  • @randomzz7353
    @randomzz7353 8 років тому +2

    display following pattern
    A
    E A C
    P E A C E
    PLZ IN 5 MINS

  • @scienceeducationalvideo3064
    @scienceeducationalvideo3064 4 роки тому

    I am of 12 but I am understanding your video

  • @LQQ.ERR0R
    @LQQ.ERR0R 7 місяців тому

    Ayy