Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDev Shed Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Dell PowerEdge Servers
  #1  
Old November 28th, 2002, 09:29 PM
matj222 matj222 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: australia
Posts: 16 matj222 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Pascal

i need to know how to make the beep sound in pascal for windows

Reply With Quote
  #2  
Old November 28th, 2002, 11:42 PM
Sepodati's Avatar
Sepodati Sepodati is offline
Banned
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Dec 1999
Location: Afghanistan
Posts: 14,360 Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)  Folding Points: 69591 Folding Title: Intermediate FolderFolding Points: 69591 Folding Title: Intermediate FolderFolding Points: 69591 Folding Title: Intermediate FolderFolding Points: 69591 Folding Title: Intermediate Folder
Time spent in forums: 2 Months 3 Weeks 6 Days 2 h 28 m 56 sec
Reputation Power: 1606
Send a message via ICQ to Sepodati Send a message via Yahoo to Sepodati
Moving to the lounge...

Reply With Quote
  #3  
Old November 29th, 2002, 01:05 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Let me guess.. this started out in the PHP forum?

At any rate, I don't know exactly, but if it's of any help, the bell is ASCII character 7. If there's a way to print characters by ASCII number in Pascal, then printing character 7 should produce that horrible beep noise.

Reply With Quote
  #4  
Old November 29th, 2002, 10:43 PM
riv's Avatar
riv riv is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 463 riv User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 37 m 50 sec
Reputation Power: 8
Ho christ, Pascal !!

Since it's for windows I don't think that would work, under Turbo Pascal 7 I used the sound() or beep() procedure (n'ah, not a function, a pro-ce-du-re) and there's another one needed to tell it to stfu.

BTW, isn't Pascal for Windows called Delphi?!
__________________
Words must be weighed, not counted.

Reply With Quote
  #5  
Old December 1st, 2002, 03:36 PM
Zitan Zitan is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: May 2001
Location: New Zealand
Posts: 638 Zitan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 10 sec
Reputation Power: 8
Delphi is to pascal what C++ is to C Eg: object orientated pascal and yeah it beats the hell of out pascal, not that I've used either since I was a student

Reply With Quote
  #6  
Old December 1st, 2002, 04:00 PM
riv's Avatar
riv riv is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 463 riv User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 37 m 50 sec
Reputation Power: 8
I loved Pascal. That was my first serious programmation language I ever got involved in (previously telegard scripts, qb and batch files!!). I should had learned C instead of wasting time with TP, was fun tough.

Reply With Quote
  #7  
Old December 1st, 2002, 04:28 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
do you think you did understand C without pascal?

no waste, itīs kinda evolution...

matj222, see here: http://msdn.microsoft.com/library/d...g/base/beep.asp - i bet they ported it to delphi...
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #8  
Old December 1st, 2002, 06:59 PM
Sepodati's Avatar
Sepodati Sepodati is offline
Banned
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Dec 1999
Location: Afghanistan
Posts: 14,360 Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)Sepodati User rank is General 9th Grade (Above 100000 Reputation Level)  Folding Points: 69591 Folding Title: Intermediate FolderFolding Points: 69591 Folding Title: Intermediate FolderFolding Points: 69591 Folding Title: Intermediate FolderFolding Points: 69591 Folding Title: Intermediate Folder
Time spent in forums: 2 Months 3 Weeks 6 Days 2 h 28 m 56 sec
Reputation Power: 1606
Send a message via ICQ to Sepodati Send a message via Yahoo to Sepodati
My first programming experience was with Apple Pascal....horrible, from what I remember....

---John Holmes...

Reply With Quote
  #9  
Old December 1st, 2002, 08:04 PM
a.koepke's Avatar
a.koepke a.koepke is offline
Second highest poster :p
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jul 2001
Posts: 7,323 a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 8 m 45 sec
Reputation Power: 26
Quote:
Originally posted by riv
(previously telegard scripts, qb and batch files!!)


Whats wrong with batch files & qb

The first language i used was Commodore Basic on a 128D. I then went to GW-Basic and then QBasic. I then progressed to VB and then ASP. I then finally went away from that crap and learnt perl & PHP. Also learnt some C but never did anything with it.

Reply With Quote
  #10  
Old December 1st, 2002, 08:47 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Quote:
Whats wrong with batch files & qb

Allow ME to answer that question, as I just completed the most mind-numbinly useless class I have EVER taken in my ENTIRE life! My time was spent better watching "Major League" in 6th grade on the last day of school than it was in this class:

Introduction to Microcomputer Programming... with... QUICK BASIC! *dum dum dum dummmm*

Let us see:

The dim() statement and arrays couldn't possibly be more useless if they tried..

The editor forces you to keep subs and ud'ed functions separate from your "main" code. This is a SERIOUS headache when you're trying to flip back and forth to make small changes.

The type statement is almost worthless.

There is no way to reliably cast data types. It's really a crap shoot when you try.

There are no increment and decrement operators.

There are 4 do/while variations.

Working with files is dangerous. The slightest mistake, and an open file will be wiped out.

String manipulation is so painful as to force the programmer to take drastic steps to avoid it for any but the simplest routines.

Output to the screen is difficult to control the format of... REALLY difficult.

Variable names are limited to alphanumerics (not including _ ) and a period.

The period, which is valid in regular variable names, has special meaning.

It is case insensitive.

You can not use files with more than 8 characters + 3 for the extension (unless you use that stupid ~n notation).

There are no end of line comments. The comment marker ( ' or REM ) is actually a compiler directive. Directives on the same line must be chained with : . Therefore, something like:
Code:
print "This is a syntax error"   ' Comment

Is a compile-time error. You have to use:
[code]
print "This is ok" : ' Pointless...

A lot of QB code makes extensive use of *shiver* GOTO.


Give me some more time... I'm sure I can think of more reasons to hate QB

As for batch files, once you've used shell scripts you'll realize how useless .bats really are...

Last edited by Ctb : December 1st, 2002 at 08:49 PM.

Reply With Quote
  #11  
Old December 1st, 2002, 10:05 PM
riv's Avatar
riv riv is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 463 riv User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 37 m 50 sec
Reputation Power: 8
Interresting but then again...

Quote:
There are 4 do/while variations.


You mean the standard for/while/loop/do that doesn't make sense even in serious programmation language? i.e.: for is a loop whose only difference is that you can specify an argument for the very first pass, conditinonal check at the begining and another one at the end. I can do that with a while or anything else for that matter. I never understood this.

You see, my first serious experimentation with programmation was really with telegard scripts which didn't had any type of loops, had to roll my own with IF and GOTO's. I can understand why I would use a loop rather than IF and GOTO granted their current application is limited to the block they're used in but a single loop will do just fine.

But seriously, I loved GOTOs except for the style and practice.

Quote:
You can not use files with more than 8 characters + 3 for the extension (unless you use that stupid ~n notation).


That's a DOS limitation first.

And I agree with the rest.

(ducked, waiting for bombs...!)

Reply With Quote
  #12  
Old December 1st, 2002, 10:20 PM
a.koepke's Avatar
a.koepke a.koepke is offline
Second highest poster :p
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jul 2001
Posts: 7,323 a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 8 m 45 sec
Reputation Power: 26
I loved trying to debug a BASIC program which had heaps of Goto's in it.

When i started programming we still has our good old line numbers... if you needed to add a large section to the program (and there wasnt a gap in the line numbers big enough) you used a goto or gosub. After about 10 modifications the term spaghetti code really started to make sense.

Reply With Quote
  #13  
Old December 1st, 2002, 11:14 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Quote:
I loved trying to debug a BASIC program which had heaps of Goto's in it.
Seriously, maybe you should start seeking treatment

Blargh... maybe if that'd been my first language, learning it wouldn't have bothered me.. but I was spoiled by perl's heavenly text-manipulation capabilities and I about went bald pulling my hair out when it came to something as simple as splitting a string up. The lack of regExp in a language REALLY hurts once you get used to them. Plus, variable expansion/interpolation in the Basic family of languages is TERRIBLE. Lack of interpolation right into a string, poor interpolation with subscripts:
Code:
LET something = 4
dim stupid(9)
FOR X = 0 TO 8 STEP 1
  stupid(X) = X
NEXT X
PRINT stupid(stupid(something));
END


That PRINT statement will silently fail. Ultimately, it SHOULD print out 4, but, instead, it fails silently under QB 4.5. Ugh. I sat and tried to debug my code for half an hour one night only to realize that the variable wasn't expanding into the subscript properly. Yuck.

Oh well, to each their own. I suppose a first programming language is like a first car: no matter how much anyone else thinks it sucks, you have to love it. After all, I love Perl 5 and people who don't like it pick it to pieces all the time too!

By the way Mat, did anyone's post answer your question?

Last edited by Ctb : December 1st, 2002 at 11:55 PM.

Reply With Quote
  #14  
Old December 1st, 2002, 11:45 PM
a.koepke's Avatar
a.koepke a.koepke is offline
Second highest poster :p
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jul 2001
Posts: 7,323