1,899 Topics
| |
import java.util.*; import java.io.*; import java.text.*; import java.lang.*; public class Pascals_Triangle public static void main(String[] args) throws IntegerEntryFailException { new Pascals_Triangle(); } public Pascals_Triangle() { int lines = 0, index = 0; char q = ';'; String string = null; Triangle myTriangle = new Triangle(); Scanner scan = new Scanner(System.in); … | |
I have looked around on the internet a little bit, but I am unable to find a function or equation for inverse/arcsine. I was able to find Inverse Cosine, but inverse sin doesn't seem to exist. Does anyone know how to use inverse sine in delphi? | |
Ok, hi guys.... I have some IT homework due tomorrow and I honestly don't know what to do. I've made multiple attempts and it's just not working out for me. So I'm asking for help ASAP PLEASE. The questions states: Write a program to read in the names of a … | |
can someone show me how to make an animation in turbo pascal? i'm a new and i'm stuck in making my first game. especially in the animation of the game. | |
I REALLY need some help. I ahve been writing a tic-tac-toe console application program in delphi. I had most of the logic finished for the program when I made a mistake. At the beginning of a class period the program was working fine, at the end of the class it … | |
I'm trying to make a program that saves images in a database. I've pulled together some info on the net and wrote up code that I think is supposed to work, but fails in a completely unique way on either side (the saving and the loading). Here's my code, could … | |
Hi Group, (delphi 7 refers) I haven't used delphi for some time. I have now a very basic app. Three buttons on form, Start/Stop/Exit objective> When Start is pressed, the app enters a while(tick=true) do begin..someCode;...end; What I now require is that, when Stop is pressed, the appl abort thisstart … | |
Sorry I´m new to PASCAL and I´m using Lazarus to program for Windows CE I dont know why I´m getting the error Error: constructors, destructors and class operators must be methods I have my Unit1 where I´m declaring my form procedures as bellow unit Unit1; {$mode objfpc}{$H+} interface uses Classes, … | |
What is the difference between Pascal and Delphi? I heard they're like the same language? | |
I use image component to display a picture for JPG,but it is lost a color.why I never meet this. I can't to upload picture to this forum. | |
This snippet shows how you can get the headers for an URL, for example to detect a redirect. I had to use the ANSI functions to ensure correctly returned headers. Manual entry for [HttpQueryInfo](http://msdn.microsoft.com/en-us/library/windows/desktop/aa385373(v=vs.85).aspx). Let me know if you have any questions/remarks. | |
| I am string to convert a string to a constant as the `StringChangeEx` function takes the second argument as a const but i have it as a string and am unsure how to get this function working as i am new to pascal. The problem is in the BackupFile function … |
I have the following code: const AGENT = 'User Agent'; SERVER = 'www.daniweb.com'; RESOURCE = 'api/access_token'; ID = ''; // my client id SECRET = ''; // my client secret CODE = ''; // my returned code, pasted from the browser REDIRECT_URI = ''; // my redirect uri ACCEPT: packed … | |
program WaterBill; uses winCrt; type customer=record acct_no:longint; code:char; liter:longint; amount:real; end; var arrayC:array[1..50] of customer; index:integer; loop:boolean; continue:char; arr:customer; PROCEDURE read_data(var data:customer); begin writeln('Customer Info: '); writeln('Account number: '); readln(data.acct_no); writeln('Code(H,C,I) : '); readln(data.code); writeln('Unit of liter: '); readln(data.liter); end; function calc_bill(code:char):real; begin if (code='H') then begin if (arr.liter<=15000) then … | |
my code can't seem to find the maximum price. program Mobile; uses winCrt; type Mobilephone=record brand:integer; model:String; price:real; end; var hp:array[1..100] of Mobilephone; count,m,MobileNum:integer; max:real; PROCEDURE read_data(var newMobile:Mobilephone); begin writeln('Brand:(1:Samsung 2:iPhone 3:Nokia)'); readln(newMobile.brand); writeln('Model:'); readln(newMobile.model); writeln('Price:'); readln(newMobile.price); end; PROCEDURE displayexp(var exp:Mobilephone); begin if(exp.price>max) then begin writeln('THE MOST EXPENSIVE HP:'); writeln('Brand: … | |
ok, every time i start a new project in dev-pascal. i edit the resource file to somthing like this: [CODE]1 ICON "C:/Dev-Pas/Icons/Edit.ico"[/CODE] ive tried manualy doing it, and with the build in GUI. after i compile the resource file itself it works just fine says: "compiled correctly" but when i … | |
Hi Does anyone know how to use it? I mean FastMM in Delphi. Or any code to work with memory leaks. Clear memory when application run or stuff like that. My exe (application )growing used memory when work and open forms, click button, read from database etc. thank you | |
it gives me an error and the code is: var a,b,c:integer; begin write('a=');readln(a); write('b=');readln(b); write('c=');readln(c); if a>b then begin if a>c then writeln('a=',a) else writeln('c=',c); end; else begin if b>c then writeln('b=',b) else writeln('c=',c); end; readln; end. | |
Maybe some one can help, to make a programm, who show after some seconds random 30 numbers in massive, then they disappears and you must guess as many numbers as you can. | |
Hello when I compile this piece of program written in pascal with gpc (GNU pascal for linux) for pascal, I get errors: cradle: In function `_start': (.text+0x0): multiple definition of `_start' /usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib/crt1.o:(.text+0x0): first defined here cradle: In function `_fini': (.fini+0x0): multiple definition of `_fini' /usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib/crti.o:(.fini+0x0): first defined here cradle:(.rodata+0x0): multiple … | |
Hey guys... I keep getting an error(Error 26: Type Mismatch) in line 19(Until num='';) and I don't know how to fix it... Can you guys please assist me.....Thanks.... program sequence; uses wincrt; var num,count_zero,count_non_zero:integer; Begin count_non_zero:=0; Repeat writeln('Enter a number'); readln(num); IF num=0 then count_zero:=count_zero+1 Else count_non_zero:=count_non_zero+1; writeln('Non Zero Count: … | |
This works in C++ Builder: int chcolor; for(int d, d < 5, d++); { String name = "d" + IntToStr(i+1); TLMDSpeedButton* button = dynamic_cast<TLMDSpeedButton*>(this->FindComponent(name)); chcolor = random(6)+1; switch (chcolor) { case 1: button->Color = clRed; break; case 2: button->Color = clSilver; break; case 3: button->Color = clBlue; break; case 4: … | |
Yes, I know what I'm talking about. which is Creating my own compiler to compile a language say C++,Java,Ruby, Python ..(Any one of them ofcourse -.- ) Actually, if I can just get the source code for an existing one that would be much better. [example] Say there's Turbo C … | |
Hi. I need help with defining on which monitor a given form is to be presented. I know I can discover how many monitors a computer has with screen.MonitorCount. But I haven't found yet how to change the settings. For example, I'd like to have a one-form application to run … | |
I have, what I thought, was a trivial question however I am not quite sure of an answer yet. I'd like a two dimensional array of strings and integers. The first "column" will be string and the second "column" will be integer. later i want the first value of array … | |
Ok, I know you guys don't really just give away the answer to the whole problem like that. But I really can't figure this one out.... The question states: The following represents some sample scores obtained by students in a test: 5,4,7,10,0,6,0,1,9,6,8,999. 999 is the dummy value which terminates the … | |
Hello, I want to make something like windows explorer. So the easy part first. I added these: [CODE] ShellTreeView1: TShellTreeView; ShellListView1: TShellListView; ShellComboBox1: TShellComboBox;[/CODE] I connected them and everything is good. I can see files and I can navigate folders, drivers, e.t.c. I changed the ViewStyle attribute of ShellListView1 to … | |
Hey guys, I'm making a program to count the number of zeros and tens in a list of numbers in the format: 5,10,5,0,4,6,7,3,0,10,2..... Yeah like in that format, how do I make it read the data like that without a set number of values to be entered and count the … | |
How do I specify a mouseDown eventhandler to dynaically creted Tpanels? My intention is to create a number of panels, like tiles, and move them around on the Form I have created a design time TPanel and copied its OnMouseDown event and saved it as PanelMouseDown. My code: Pan:=TPanel.Create(Form2); Pan.Height:=60; … |
The End.