Loading ...
Sorry, an error occurred while loading the content.

38103Re: [libertybasic] Sales date file in c:\temp directory

Expand Messages
  • Marc Rossi
    May 1, 2009
    • 0 Attachment
      --- On Tue, 4/28/09, tinantaz2 <tina2260@...> wrote:

      From: tinantaz2 <tina2260@...>'
      'I wrote this in about 5 mins because I am heading for work I am new myself
      ' but I hope this can help
      button  #main, "Get Sales", [getsales], LR, 150, 100
      button  #main, "Show Sales", [showsales], LR, 150, 70
      open "Get Report" for window_nf as #main
      print #main, "trapclose [quit]"
      open "c:\junk1\p.txt" for random as #people LEN = 30
      FIELD #people ,20 as name$, 10 as amount
      prompt "How many sales to enter?";numofsales
      for a = 1 to numofsales
        prompt "Name:";name$
        prompt "Amount:"; amount
        put #people, a
      next a
      close #people
      open "View" for text as #v
      open "c:\junk1\p.txt" for random as #people LEN = 30
      FIELD #people, 20 as name$, 10 as amount
      for a = 1 to numofsales
        get #people, a
        print #v, "Name: ";name$
        print #v, "Total Sales: "; amount
      next a
      close #people
      close #main
      close #v
      ' work on this till it is right heading for work

      Subject: [libertybasic] Sales date file in c:\temp directory
      To: libertybasic@yahoogroups.com
      Date: Tuesday, April 28, 2009, 1:05 PM

      Can anyone help with the following programming setup for Liberty
      Basics or do you know where I can get help/tutoring or
      tutorials? Thanks, Tina

      Save the data file below to your c:\\temp directory on your
      computer. Then write a program that will read the data from
      the file and display the data as follows:

      Monthly Sales Report

      Store Salesperson Amount

      1 T. Arnold 4444.44

      1 J. Baker 5555.55

      2 T. Dashell 7777.77

      3 B. Franklin 9999.99

      Be sure to look at the data in the file to see where the fields
      are defined for each record. The header part of the output
      should be in a sub that is called from the top part of you

      T. Arnold,1,4444. 44
      J. Baker,1,5555. 55
      T. Dashell,2,7777. 77
      B. Franklin,3,9999. 99

      [Non-text portions of this message have been removed]
    • Show all 6 messages in this topic