Answered Help! :)

  • Monday, September 24, 2012 4:43 PM
     
     
    Hello, So I'm new in programming and small basic i'm working in small basic in less then a week so i need some1 to help me, and tell me something idea for like some programm i can make for practice! :) Thanx

All Replies

  • Monday, September 24, 2012 5:10 PM
     
     Answered

    You could make a little information program.

    That's what I did first. It is pretty simple, but u must work very correctly.

    If you don't know, what I mean with an information program, here is the explanation:You save information in this program. For example the birthdays of your family. And if you type in the name of your mother, you will get all information you have about her.

    This program should have...

    - a clear menu

    - a function to save more information without editing the .sb file

    - a kind of search function

    This may hear easy, but it may be hard, if you don't know (for example) how to use Arrays (like me) at the beginning.

    You could ask your family, what they have for ideas.

    I hope this is helpfull. :)

    Greetings

    Timo


    Ich bin Neu

  • Monday, September 24, 2012 5:18 PM
     
     
    woow i know this all to make but i don't know how to make add function work :/ , little help? :)
  • Monday, September 24, 2012 5:20 PM
     
     
    one more question, how can i make the programs that i make in SB to copmile it in .exe? :(
  • Monday, September 24, 2012 5:46 PM
    Moderator
     
     Answered
    Save the SmallBasic file (*.sb) somewhere and compile it (run it in the interface), then an exe will be created in the same directory the SB file was saved.
  • Monday, September 24, 2012 5:48 PM
    Moderator
     
     

    Start with the 'Introducing Small Basic' document found in the Start menu, then look at some of the code published by others to get an idea of how it works.

    Try the Challenges list for each month as a sticky thread - there are lots from the past too, search this forum for 'Challenge of the'.

  • Monday, September 24, 2012 6:38 PM
     
     Answered Has Code
    woow i know this all to make but i don't know how to make add function work :/ , little help? :)

    Here is a little code. I have not tested this code, but it should work. It will be only able to save 1 new entry. I will correct this tommorow. Tell me if doesn't work.

    Sub Start
    TextWindow.WriteLine("Choose your option. To create a new entry, write Entry. To read an Entry write Read.")
    EntryM = TextWindow.Read()
    
    If (EntryM = "Entry")
    Entryy()
    ElseIf (EntryM = "Read")
    Readd()
    Else
    TextWindow.WriteLine("Wrong commando!")
    Start()
    EndIf
    EndSub
    
    
    
    Sub Entryy
    TextWindow.WriteLine("Enter a new entry:")
    Entry = TextWindow.Read()
    Path[1] = "The path of your outputfile(you should use a .txt file)(here is an example: C:\Users\You\Desktop\MyNewEntry.txt)"
    File.WriteContents(Path, Entry)
    TextWindow.WriteLine("")
    TextWindow.WriteLine("Your new entry has been saved.")
    Program.Delay(1500)
    TextWindow.Clear()
    Start()
    EndSub 
    
    Sub Readd
      For x = 1 To 1000000
        TextWindow.WriteLine(Path[x])
      EndFor
    EndSub

    It is important, that you save this code as a file anywhere on your computer. The create at the same directory a new .txt file with the same name like in the program.


    Greetings Timo