119 Posted Topics
Re: What problems are you having? One issue is that n1 and n2 are set to the wrong values. Suppose S1 has 3 words: 'one two three'. Your logic in this line: while slovo (s1, n1) <> '' do inc (n1); is like this: (n1 was originally set to 1). slovo … | |
Re: The first line of your input file is: Doe Jane 15 10 and you are trying to read it like this: Read(Infile, last, first, hours, wage); So you are assuming that the READ command will automatically split the line at the spaces to produce the 4 variables, and convert the … | |
I am planning a new business venture involving an online store. This is an area where I have no experience (my background is in desktop software & device drivers, not web sites). I would welcome advice on 2 aspects of this project. First, I could learn about this and set … | |
Re: If you run the source code through a compiler you can gather the compiler output and parse it to find the errors reported by the compiler. Then analyse the error list and suggest causes and/or fixes. For common things like undeclared or mis-spelt variables, missing include files and so on, … | |
Re: I am currently working on an app that does something similar, selecting records from a table in Access. The SQL (which I didn't write myself) is basically: SELECT * FROM ( SELECT TOP 5 * FROM <TableName> [WHERE blah blah blah] ORDER BY Rnd(-(1000*ID)*Time())) ORDER by blah (ID is a … | |
Re: sndPlaySound doesn't work like that for me. I guess you are specifying SND_ASYNC in your sndPlaySound call, so I am not sure what is going wrong. I just tried a quick test: for i := 1 to 1000 do writeln(i); writeln('Play sound'); sndPlaySound('Whatever.wav',SND_ASYNC); writeln('Sleep'); sleep(2000); for i := 1 to … | |
Re: Adding them is the easy bit. Doing something with them is harder! First step is to create a resource script, which is really just a list of the images you want in your app. It looks something like this: IMAGE1 BITMAP CHEMICAL.BMP IMAGE2 BITMAP FACTORY.BMP IMAGE3 BITMAP FINANCE.BMP IMAGE4 BITMAP … | |
Re: Consider these lines: iR100 := iR100 + 1; iR50 := iR50 + 1; iR20 := iR20 + 1; iR10 := iR10 + 1; iR5 := iR5 + 1; iR2 := iR2 + 1; iR1 := iR1 + 1; You can only ever add 1 to the number of notes of … | |
Re: Good to see some activity here, so thumbs up for posting this. Should it be under Tutorials? One suggestion I would make is to use more meaningful variable names. The code would be much easier to scan and you would not need comments to explain what your variables are for. … | |
Re: It used to be that you would know the address of the strings you want to read and read that block of memory with ReadProcessMemory, but I think nowadays Windows randomizes the layout of memory to prevent such techniques (for security reasons). My guess is that ReadProcessMemory originated at a … | |
Re: I guess the problem is in the `Chr(Asc(0))` call. Asc expects a string and you are providing a number. You only need to put `Chr(0)`. Or possibly `vbNullChar` or whatever it is (can't remember). | |
Re: Not sure exactly what you want, but I guess you can get the text displayed within the window and the size of the window easily enough. This should give you enough information to call DrawText. If you include DT_CALCRECT in the uFormat parameter this won't actually draw the text but … | |
Re: In the TestSearch procedure you SEEK to the last record in the file but you don't read that record before checking the Test.TestNo | |
Re: Where is your code? (Which method of which object?) It should be in the paint method of the picturebox (something like PictureBox1_Paint) so it will automatically be run whenever it is needed. If you put it somewhere else it is not necessarily called when the form is re-drawn, so your … | |
Re: Not sure what your question is, but you have a few little errors in your code. 1. You have the code blocks (`begin...end`) for 3 loops but you only have the "`for`" statement for the first loop. 2. You have missed a semi-colon at the end of a line. 3. … | |
Re: The error message is quite specific: ";" expected but "BEGIN" found So it was expecting to find a semi-colon and instead it found the word "begin". Looking through your code there is only 1 begin: program one; var x,y:integer begin So that is where the error is. It wants to … | |
Re: Doesn't the `f.write('\r\n')` have to be indented so it is written for every line, not just once at the end? | |
Re: The Complete Guide to SOFTWARE TESTING, 2nd edition, by Bill Hetzel devotes a chapter (11 pages) to testing software changes. It has some relevant comments that may be worth a look. | |
![]() | Re: Does your form have an onCreate event handler? If not, add one. Then put a breakpoint in the event handler and when you hit the breakpoint check the call stack window to see what code was running when the form is created. Alternatively, do a "Search ... Find in files" … ![]() |
The End.