| | |
Need your opinion:
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2008
Posts: 21
Reputation:
Solved Threads: 0
O.k. this is my first scripting class and I need someone's opinion on this code. I need to write a code for a modularized program that will:
1.) read each record from the inventory database
2.) print a price tag for each item in inventory
3.) count and print the total number of tags printed
4.)sum and print the total retail value of the inventory in the store
Here's the code I came up with. Please tell me if it is correct or not.
1.) read each record from the inventory database
2.) print a price tag for each item in inventory
3.) count and print the total number of tags printed
4.)sum and print the total retail value of the inventory in the store
Here's the code I came up with. Please tell me if it is correct or not.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
start perform housekeeping ('This will declare variables perform housekeeping ) (with read) while not eof perform mainLoop (‘This will read each record from the database) perform calculateTotalretailvalue ( ) endwhile perform finishup ( ) stop housekeeping ( ) declare variables invRecord char invDescription num invItemnumber num invQuantity num invRetailprice num invTotalretailvalue num invTotaltags char mainHeading = "INVENTORY REPORT" char columnHead1 = "ITEM RETAIL PRICE QUANTITY DESCRIPTION" char columnHead2 = "TOTAL RETAIL VALUE TOTAL TAGS ITEM NUMBER" num totalRetailvalue open files INVENTORY , Printer print mainHeading print columnHead1 print columnHead2 read invRecord return mainloop ( ) Read the first record While not eof Print fldItemnumber , fldDescription , fldQuantityonhand , fldRetailPrice ItemCount = ItemCount +1 Totalretailvalue = (fldQuantity * fldRetailprice ) endwhile Read next record Loop Print “Retail price : “ & ItemCount Print “Value of Inventory = “ & Totalretailvalue return calculateTotalretailvalue ( ) Totalretailvalue = (fldQuantity * fldRetailprice ) return printTotalretailvalue ( ) print Totalretailvalue return finishup ( ) close files INVENTORY , Printer return
Last edited by Tekmaven; Jul 25th, 2008 at 2:07 pm. Reason: Code tags
![]() |
Similar Threads
- Opinion on Software Theft (IT Professionals' Lounge)
- Your Valuable Opinion Needed - Thank You (C++)
- Final yr project an opinion needed on "dynamic web pg creator" (Computer Science)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Need to separate 16 bit binary to 4bit and 12 bit binary values
- Next Thread: editting existing txt file data
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





