|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
i need to know how to make the beep sound in pascal for windows
|
|
#2
|
||||
|
||||
|
Moving to the lounge...
|
|
#3
|
||||
|
||||
|
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. |
|
#4
|
||||
|
||||
|
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. |
|
#5
|
|||
|
|||
|
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 ![]() |
|
#6
|
||||
|
||||
|
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. |
|
#7
|
|||
|
|||
|
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. |
|
#8
|
||||
|
||||
|
My first programming experience was with Apple Pascal....horrible, from what I remember....
---John Holmes... |
|
#9
|
||||
|
||||
|
Quote:
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. |
|
#10
|
||||
|
||||
|
Quote:
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. |
|
#11
|
||||
|
||||
|
Interresting but then again...
Quote:
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:
That's a DOS limitation first. And I agree with the rest. (ducked, waiting for bombs...!) |
|
#12
|
||||
|
||||
|
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. |
|
#13
|
||||
|
||||
|
Quote:
![]() 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. |
|
#14
|
||||
|