Duoas 1,025 Postaholic Featured Poster

The choice of TListView is a bit odd to me. You could have just as easily used a TListBox or TRichEdit component, which will give you an items: TStrings or lines: TStrings property, as well as LoadFromFile and SaveToFile methods.

You also need to check to make sure the user did actually choose a filename. The filename returned will always be the full path of the filename --there is no need to add '.txt' to it:

procedure TForm1.Button12Click(Sender: TObject);
  begin
  if savedialog1.Execute() then
    ListBox.items.saveToFile(saveDialog1.fileName)
  end;

If you only want to save, say, 250 lines at a time, you can do something like:

procedure save250( filename: string; var strs: tStrings; startAt: integer );
  var
    sl:   tStringList;
    b, e: integer;
  begin
  // Our temporary string list
  sl := tStringList.create;
  // indices of lines to copy, inclusive
  b  := startAt;
  e  := startAt + 249;
  if e >= strs.count then e := strs.count -1;
  // copy the indexed lines into our temporary string list
  for b := b to e do
    sl.append( strs[ b ] );
  // save the lines to file
  sl.saveToFile( filename );
  // cleanup
  sl.free
  end;

Did you really want the caption saved at the beginning of each line?

Hope this helps.

Duoas 1,025 Postaholic Featured Poster

Yeah, actually I agree. I just didn't want to overload him with the overhead of remembering too much information at once per loop.

In fact, I still think the best solution is to load an entire line at once and play with the character string in memory. That way you don't have to remember anything from loop to loop and you can avoid weird stuff like ungetc().

Duoas 1,025 Postaholic Featured Poster

I understand DLLs just fine. I've written code to handle import and export tables. That's not what the OP wants.

No PE exports types. Remember, a class is a data type, not an addressable object.

Using data objects from a foreign DLL is always a tricky thing because you must know its exact memory footprint to play with it. For simple things like integers and doubles that isn't a problem, but when you start playing with C++ classes life becomes triply hard. You are better off compiling and linking the code yourself.

If you are sure you are using the exact same compiler system and exact same version as the one that compiled the DLL you want to use, you can probably get away with simply including the class header and linking the methods in the DLL.

Either way, it is a lot of work, and based solely upon the OP's original questions I expect he knows next to nothing about DLLs and their inner workings.

Driving a car is one thing. Knowing the tolerances in the gas manifold is another.

Duoas 1,025 Postaholic Featured Poster

1. Yes.
2. No.

Is this related to the other post you made?

Word is not very good at reading all properly-formatted RTF. It likes and understands its own peculiar brand best, and can put-up with simple stuff from, say, wordpad and the like.

Duoas 1,025 Postaholic Featured Poster

No one. Please use google.

Sorry to be rude, but the only reason to code this in assembly is for homework. The game is not that hard so you can do it yourself easily.

Duoas 1,025 Postaholic Featured Poster

I'm not sure exactly what you are trying to do.

What exactly do you mean by "moves"? By "object" do you mean a raster color run (a horizontal line of the same color)?

What is the purpose of doing this? The ppm format is as horribly inefficient as pbm, the only real difference is that it stores RGB colors instead of on/off. It has no compression or organization other than a simple list of pixels in raster order.

If you can explain it better with pictures, I don't mind.

Duoas 1,025 Postaholic Featured Poster

Your professor has done an extraordinary job of giving you concrete information to work with. Just take it one step at a time.

Look through the functions he has asked you to write and pick the one you think will be easiest. Do it first. Work from easiest to hardest and it will help you organize your thoughts better.

When you get some code post it and any errors you are getting when you compile or run it.

Good luck.

Duoas 1,025 Postaholic Featured Poster

No one here is going to give you code to do your homework. You need to think about the problem some bit more than you have so far, post all the code you've got and any compiler errors or i/o errors, and then we'll help you fix it.

Duoas 1,025 Postaholic Featured Poster

What he is saying is that he wants you to read the file all at once instead of line by line or int by int or whatever.

To do that, you have to know how big the file is in bytes in order to allocate the memory to store it (which is why you need to open it in binary mode, since that turns off special text file translations such as "\r\n" to "\n").

There is no function in standard C++ to tell you the length of a file. However, there are functions you can use together to get that information. Here's a handy reference. Try to find functions that will help you.

Then you can just use ifstream.read() to load the whole file into your newly-allocated character buffer.

Hope this helps.

Duoas 1,025 Postaholic Featured Poster

You've got an off-by-one error. The elements of your array are numbered 0..299.

Duoas 1,025 Postaholic Featured Poster

Sounds to me like he's in some national programming contest.

Duoas 1,025 Postaholic Featured Poster

An integer is represented (by humans) thus: 1234 1 is in the thousands place
2 is in the hundreds place
3 is in the tens place
4 is in the ones place

Each place to the left is times 10. So:
1234 div 10 is 123 R 4
123 div 10 is 12 R 3
12 div 10 is 1 R 2
1 div 10 is 0 R 1

The only problem is that we get the numbers out in the wrong order for printing: 4, 3, 2, 1.

So, just load EAX with your (unsigned) number and reverse it into, say, EBX using div and mul by 10. (Keep in mind that DIV and MUL use EAX:EDX implicitly, so you will have to push and pop some values to preserve them.)

Once the number is reversed, do the same sort of thing again (peeling off the ones position by dividing by ten), add 48 to your result (ASCII code for '0') to turn your 0,1,2,... into '0','1','2',..., then print the character.

Hope this helps.

Duoas 1,025 Postaholic Featured Poster

You can't. DLLs only export functions, not classes.

Duoas 1,025 Postaholic Featured Poster

That was my first thought too, but I realized that very problem would occur. Having thought it over some the answer is embarrassingly obvious: just cut and paste the text.

Hope this helps.

Duoas 1,025 Postaholic Featured Poster

Good point. He did say that there needed to be an alphabetic letter both to the left and to the right.

Both WaltP and I have a similar vein of thought. If you encounter an apostrophe character, check to see if the last character was an alphabetic character. If it was, either (set a flag for use in the next loop) or (use fgetc() and ungetc() ) to check to see if the next character was also an alphabetic. If it was, then save the apostrophe else get rid of it.

Good luck.

Duoas 1,025 Postaholic Featured Poster

Google is your friend.

Try this.

Good luck.

Duoas 1,025 Postaholic Featured Poster

Think about the types of things you have.

You have a NODE class, which is used by the multiword class to store a list of some unspecified TYPE.

The fillNames() function shouldn't know or care what type of thing TYPE is. Just read it from file and store it.

Give it some thought...


Now, when it is time to use your linked list class, what type of thing are you storing in a list? Does it matter if the multiword class has any idea what type that is? Should I be able to say: multiword<int> my_int_list; or: multiword<bool> my_bool_list; or: multiword<Employee> my_employee_list; (where Employee is some class defined elsewhere with the >> and << I/O operators properly overloaded)

Think about it.

Duoas 1,025 Postaholic Featured Poster

Here are the errors I am getting from your code:

D:\prog\cc\foo\t>g++ t.cpp
t.cpp: In function `int main()':
t.cpp:19: error: `sum' was not declared in this scope
t.cpp:20: error: `enterstudent' was not declared in this scope
t.cpp:24: error: `studentname' was not declared in this scope
t.cpp:24: error: `DONE' was not declared in this scope
t.cpp:30: error: `testgrade' was not declared in this scope
t.cpp:30: error: `averagescore' was not declared in this scope
t.cpp:32: error: expected `;' before "return"
t.cpp:38: error: a function-definition is not allowed here before '{' token
t.cpp:44: error: initializer expression list treated as compound expression
t.cpp:44: error: expected `,' or `;' before '{' token
t.cpp:53: error: a function-definition is not allowed here before '{' token
t.cpp:57: error: expected `}' at end of input

All those "not declared in this scope" errors mean you are trying to use a variable you didn't define.

The first one, sum, you say: sum = 0; but you never said: double sum; You must declare variables before you try to use them.

All the errors after line 32 are due because you forgot to put a } at end of your while loop. Please be careful about how you format and indent your code. Also, when you post, place the code in code tags:

[[I][/I]code[I][/I]]
Code goes here
[[I][/I]/code[I][/I]]

becomes:

Code goes here

Like WaltP says, take things one step at a time.

Hope this helps.

Duoas 1,025 Postaholic Featured Poster

You need to be just a little more careful with names
Insertion() is a bad name because it is not obvious that it sorts the list. InsertionSort() is a good name.

Destroy() is not a good name because it doesn't destroy your object; it only deletes every item in the list. Name it something like Clear() or MakeEmpty(). By the way, Initialize() has the same logical functionality: both clear the list if not already emtpy. I would get rid of Initialize() and just use Clear() or whatever you name it. Actual initialization already occurs properly in the constructor.

Be careful with your types
In general, you should not assume that TYPE has a member function setName(). If you are just making a linked list of strings, there is no real reason to create a new class just to hold it. Just use std::string. Also, in template declarations, use the word typename instead of class. (Yes, yes, I know... semantics. Even so...)

More on fillNames()
You are trying to do two things here: initialize *this from file and initialize some that (which you named cList). If you need two copies of the multiword list, make a copy constructor and copy it that way; Don't force your user to fill two multiword lists just to load from file.

Also, you are using a member function named insertAt() which you have not defined to exist in the multiword class.

I recommend that you get rid of …

Duoas 1,025 Postaholic Featured Poster

Or you could just use the strspn() function: if (strspn( dnaStr, "AaTtCcGg" ) < strlen( dnaStr )) puts( "error in DNA" );

Aia commented: Aye +4
Duoas 1,025 Postaholic Featured Poster

What about 'till (for until) and nothin'? If those are also valid then your condition might easily be simply to check if the apostrophe is adjacent to a letter on either the left or the right.

You are testing each character as you read it, so you will need two extra variables: a boolean to tell you if the last valid character read was a letter or not: int isLastALetter; and the next character from the file char nextChar; You can pluck the next character from file and replace it thusly:

nextChar = fgetc(fp);  // get next char
// is nextChar a letter?
ungetc( nextChar, fp );  // "un-get" next char

Another option (what I would have done) is read each line into a string and then scan the string and do the c-1 and c+1 stuff you were thinking of.

Hope this helps.

Duoas 1,025 Postaholic Featured Poster

Float types are just the hardware's floating point data type. Usually this is an IEEE single (4-bytes), double (8-bytes), or extended (10-bytes).

The problem with these is that they approximate numbers. Hence, they are not very exact. They lack precision and they are susceptible to the influences binary arithmetic.

The python decimal module gives a floating point class called Decimal which stores a number exactly. The tradeoff is that it is not as fast to use as a float. In most cases it is not so important to be so exact, so the float works just fine and there is no need to use Decimal.

However, in scientific computing exactness is often very important, so the Decimal type is very handy whenever it makes a difference between, say 1.000000000 and 1.000000001 Hope this helps.

bumsfeld commented: very nice explanation +3
Duoas 1,025 Postaholic Featured Poster

Er, I tend to add a little more information than necessary. IEEE defines the 4-byte and 8-byte floating point number formats used by most minicomputers. In C they are float and double respectively. Don't worry too much about IEEE. Just know that a variable has a specific type, such as int, double, string, bool, void, etc.

THe void type is C and C++'s way of saying that the type of a thing is unknown or undefined. For functions, it means that the function doesn't return anything.

Duoas 1,025 Postaholic Featured Poster

You're looking fairly good.

2. You are given an istream named inFile. You need to create two floats: one named x and the other named y. Remember that cin is also an istream (so you can use your file stream just like you use cin).

6. Remember, 7.987... rounds to 7.99. Also, I presume your output has a space in front of it: " 7.99"

7. Yes, it's int x, y, z; , but now that you've opened "data.dat" you need to read a value for x, then a value for y, then a value for z. Remember, myFile is an istream.

Surely you know how to calculate the sum and average of x, y, and z?

Hope this helps.

Duoas 1,025 Postaholic Featured Poster

Your problems are mostly syntactic, not logical (which is good).

When you declare something you give its type. So, for example, you can declare a double as: double test1; You can likewise declare a function as: void test_score (double& test1, double& test2, double& test3) You must declare things before you use them so that the compiler knows what type of things they are. According to the above, test1 is a IEEE double floating-point variable, and test_score is a procedure taking three arguments, each one a reference to a double.

That's good. However, once you declare a thing you don't need to remind the compiler what it is when you use it. You did well with the student name: you declared a string variable (studentName) and then used it. You need to do the same thing with test_score:

int main () {
  // the student's test scores, obtained using test_score()
  double score1, score2, score3;
  // the student's name
  string studentName;

  cout<<"Enter student's name or DONE to quit:";
  getline (cin, studentName);

  test_score( score1, score2, score3 );

  return EXIT_SUCCESS;
  }

The type of a thing makes a great deal of difference when programming. In your test_score() function you should remember that its type is "a function taking three references to doubles and returning void (that is, it doesn't return anything)." So it is properly written without a return statement:

void test_score (double& test1, double& test2, double& test3)
{
  cout<<"Enter 3 test scores:";
  cin >> test1 >> test2 >> test3; …
Duoas 1,025 Postaholic Featured Poster

The problem is that pos2 is finding the same space character as pos. Essentially you are doing this:

pos  = string( "Hello, world!" ).find( " " );
pos2 = string( "Hello, world!" ).find( " " );

The same space is found each time.

The find() function takes a second parameter which lets you specify where in the string you want to start looking. So:

// find all spaces
pos = -1;
cout << "Finding spaces in \"" << s << "\"\n";
do {
  pos = s.find( " ", pos+1 );
  if (pos != string::npos) cout << pos << '\n';
  }
while (pos != string::npos);

Each time through the loop we start looking after the last space found.

Hope this helps.

[EDIT] fixed my code. Forgot that string::npos == -1.

Duoas 1,025 Postaholic Featured Poster

Welcome to the world of programming.

All I can say is: it gets better.

The C++ compiler (especially with the STL) is not a very sympathetic complainer. Show us what you've done: algorithm, code, errors, etc. and we'll help you think your way through it.

Don't feel bad or give up though. You are waaay smarter than that computer (even if it likes to pretend otherwise). :)

Duoas 1,025 Postaholic Featured Poster

The strstr() function #include <string.h> will return whether or not a given string contains a given substring.

char string_to_search[] = "Hello, world!";
char string_to_find[] = "world";
char *pos;
pos = strstr( string_to_search, string_to_find );
if (pos != NULL)
  printf( "found it at index %d\n", (int)(pos -string_to_search) );
else 
  printf( "not found\n" );

Hope this helps.

Duoas 1,025 Postaholic Featured Poster

Forgive the apparent pun, but you need to observe the pattern of your image. For illustration I'll supply my own example image here:

......ABCDEFGFEDCBA
.....ABCDEF...FEDCBA
....ABCDE.......EDCBA
...ABCD...........DCBA
..ABC...............CBA
.AB...................BA
A.......................A

There is a pattern to each line.

The first pattern is that the number of red dots (representing spaces) decreases by one for each line. There are seven lines and the first line starts with six dots, so the first line will always be (number of lines - 1) red dots.

The second pattern is the number of green dots. The first line contains no green dots; the second line contains three green dots; and thereafter each line contains four green dots more than the last line, two added to each side of the center.

The last pattern is the number of letters on the line. The center letter of the first line is G, the seventh letter of the alphabet. There are also seven lines.

Now, consider each pattern. Put them all together into a single loop which prints a single line every time through the loop (that is, every iteration). You will have to keep track of three things: the current number of red dots, the current number of letters, and the current number of green dots.

Good luck.

Duoas 1,025 Postaholic Featured Poster

I'm not sure what you mean.

Do you mean that you want to execute another exe from your program? You can do that using the system() function or one of the exec functions in <unistd.h> .

Hope this helps.

Duoas 1,025 Postaholic Featured Poster

Alright. Here you go.

#! /usr/bin/env wish
#
# userbackup.tcl
# Backup a directory as a tar.gz file
#
# Error checking is minimal.
#
package require Tk

proc main {} {
  set done false

  # (Don't show any windows except the dialogues)
  wm withdraw .

  while {!$done} {

    #-------------------------------------------------------------------------
    # Get the full path of the directory to backup
    set dirname [tk_chooseDirectory \
                  -initialdir ~     \
                  -title      {Select the directory you wish to backup} \
                  -mustexist  true]
    if {$dirname eq {}} {
      # tk_messageBox -icon info -title {} -message Cancelled. -type ok
      return
      }

    #-------------------------------------------------------------------------
    # Generate a default filename
    set basename [file tail $dirname]
    if {$basename eq {}} {
      tk_messageBox   \
        -icon    info \
        -title   {}   \
        -message "You cannot backup '$dirname'" \
        -type    ok
      continue
      }

    # (tack on the date and time)
    set basename $basename.[clock format [clock seconds] -format %d-%m-%Y.%H%M]

    #-------------------------------------------------------------------------
    # Ask for the place to save the backup
    set filename [tk_getSaveFile          \
                   -filetypes   {{{Tar-gzipped files} {.tar.gz}}} \
                   -initialdir  ~         \
                   -initialfile $basename \
                   -title       {Select the backup filename}]
    if {$filename eq {}} {
      # tk_messageBox -icon info -title {} -message Cancelled. -type ok
      return
      }

    # (make sure the filename ends in either .tgz or .tar.gz)
    set ext [file extension $filename]
    if {($ext ne {.tgz}) && ($ext ne {.tar.gz})} {
      set filename $filename.tar.gz
      }

    # (make sure that the backup file isn't to be placed in any directory
    #  being backed up)
    if {[string first \
          [file normalize $dirname]/ \
          [file normalize $filename]] …
Duoas 1,025 Postaholic Featured Poster

Line numbers are added when you specify what language you are posting with.

[[I][/I]code=C++[I][/I]]
int main() { ...
[[I][/I]/code[I][/I]]

becomes

int main() { ...
Duoas 1,025 Postaholic Featured Poster

Everything happens when you hit the [Process] button. So add an OnClick method and inside that just check to see what value edit1.text string is, and set the other edit text strings appropriately.

Good luck.

Duoas 1,025 Postaholic Featured Poster

How do you compare if two registers are equal in assembly?

Duoas 1,025 Postaholic Featured Poster

I don't know. It works fine on my end.

Question: why all the DateOfBirth1,... strings?

If you want to know which date is older just compare them:

var d1, d2: tDateTime;
begin
  d1 := strToDate( '28/10/2007' );
  d2 := strToDate( '29/10/2007' );
  if d1 < d2
    then writeln( 'correct: the 28th comes before the 29th' )
    else writeln( 'error: apparently the 29th comes before the 28th...' )
end.

You already have all the dates in your array. Just find the record that has the oldest date and print that record.

Duoas 1,025 Postaholic Featured Poster

Hmm, you're right. I was thinking of the = operator in sed, which is just a line count...
I'm quite rusty at this stuff... so give me a little bit to find out what I can...

Duoas 1,025 Postaholic Featured Poster

Siddhant3s, please stop giving people code. Read the Announcement.

The purpose of the forum is the help people learn, not get us banned from schools.

Duoas 1,025 Postaholic Featured Poster

Sed can do it easily. You'll have to get a little familiar with some simple regular expressions.

Here's a page with all kinds of useful information.

Hope this helps.

Duoas 1,025 Postaholic Featured Poster

After a little googling I found that Borland's AnsiString is actually a class, much like std::string.

So your code should say:

MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,
    tempstring.c_str(), -1, buff, sizeof(buff));

Hope this helps.

Duoas 1,025 Postaholic Featured Poster

With the kind of syntax errors it is letting him get away with it almost undoubtedly is TurboC...

Don't use C style headers. Use instead C++ headers. #include <iostream> #include <fstream> #include <cassert> Personally, I can't stand all the assert stuff people throw in their code for minor errors... but seeing as you don't use any you don't need to include the header...

The main() function always returns an int. At the very least it should look like this:

int main()
{
  // do stuff here
  return EXIT_SUCCESS;
}

The ifstream class does not need to be told not to create a file. (But ios::nocreate is non-standard anyway.) Just say: instream.open( filename ); OK, on to logic errors.
First, you need to be much more careful how you handle your linked list nodes. You've got dangling pointers.

Use function arguments to create a node, not global variables. This will help fix your errors. For example, create a function named: Line *add_node( char *text, Line *prev, Line *next ); All this function should do is create a new node and fill it with the information given to it.
This forces you to separate your linked list code from handling global variables. To create the first node in the list, just say head = tail = add_node( "I am first", NULL, NULL ); You can append a node in a similar way: tail = add_node( "I am not first", tail->prev, NULL ); The reason your output …

Duoas 1,025 Postaholic Featured Poster

Glad to have been of help. :)

Duoas 1,025 Postaholic Featured Poster

/me reads first post yet again

Hmm. I don't know why I thought you were using windows.

In any case, this makes it a bit easier. I'll just use Tcl/Tk. Give me a day or two and I'll give you a you nice GUI script.

Duoas 1,025 Postaholic Featured Poster

Both your teachers are full of crap.

Use ==.

Keep in mind, though, that == is limited to an exact match comparison and only returns bool. You can get a little more information back using functions like string.compare().

Hope this helps.

[EDIT]
I should give a little more info.

For the first teacher: if system load were to affect your code then there is something seriously wrong with your compiler. Chances are that == just calls the compare function... (but I don't actually know, having not bothered to read the STL code for it).

For the second teacher: why waste time and space converting a C-string to a std::string when you have a function that will do what you want perfectly well without going through the long winded and wholly unnecessary effort... Kind of like this sentence, no?

@rugae, just smile and nod when they start spouting stuff about odd behavior and extra hoops. :wink:

Duoas 1,025 Postaholic Featured Poster

Hey there, I've been playing around with a WSH script that could do it for you. However, I need to know, are you using XP?

Duoas 1,025 Postaholic Featured Poster

No, you had that correct. The return tuple is (child's output, child's input).

I don't know what's wrong...


[EDIT]
I just had a thought. Is your C program compiling correctly or is it producing errors? You might have to use popen3()...

Duoas 1,025 Postaholic Featured Poster

The writeln procedure only knows how to format and write certain types of things: all of the simple data types (integer, byte, word, char, single, double, boolean, etc.) and strings. It is blissfully ignorant about everything else.

Hence, you can't say writeln( personinfo ); --it just doesn't know how. The same is true of readln. You had to read into strings and convert things as needed.

Remember when you read the date you had to say readln( dateStr ); personarray[ i ].dateOfBirth := strToDate( dateStr ); That's because TDateTime is an abstract data type, and you need functions to convert it to and from a string.

uses SysUtils;
var
  d: tDateTime;
  s: string;
begin
write( 'Please enter a date as M/D/Y: ' );
readln( s );
try
  d := strToDate( s )
except
  writeln( 'You did not enter a valid date.' );
  halt
  end;
ShortDateFormat := 'mmmm d, yyyy';
writeln( 'The date you entered was ', dateToStr( d ) )
end.
Duoas 1,025 Postaholic Featured Poster

You have a good general idea of what you are doing. However, you need to pay attention to what type of thing you are handling, and where your pointers currently point.

In your show() function you have improved some. Let me add some commentary that might help you:

void polynomial::show()  // Show Polynomial
{
  struct node *ptr;  // good.
  ptr=start;  // good.
  while(ptr->next!=NULL)  // excellent
  {
    // good. prints the current node's coe, which is an integer,
    // followed by a string "X^",
    // followed by the current node's exp, which is an integer.
    // (See note 1)
    cout<<ptr->coe<<"X^"<<ptr->exp;

    // good. now the current node is the next term in the poly
    ptr=ptr->next;

    // but wait: I still think I am the term I was before the 
    // last statement. I should really be testing if the _current_
    // node pointer is null: if (ptr != NULL)
    // (See note 2)
    if(ptr->next!=NULL)
      // your first attempt here was very good. This could
      // read: if (ptr->coe < 0) cout << " - "; else cout << " + ";
      // remember that we already changed the current term
      // (see note 1)
      cout<<"+";
  }

  // (See note 3)
  cout<<"\b\b ";
}

Note 1
You are already aware that C++ will put a negative sign in front of a negative integer when you print it. Currently your polys will print as: 5X^2 + -4X^1 + 12X^0\b\b You could make it look like you wanted by:
1. before …

Duoas 1,025 Postaholic Featured Poster

Yes, you will need two counters. But I don't see why you will ever have to modify the original string. You will have to overwrite the second string several times...

Duoas 1,025 Postaholic Featured Poster

You are asking the wrong kind of question (please read the Announcements) and in the wrong forum (this is C++ Software Development, not the Tech Talk forum).

Please spend some time with your textbook, googling, and thinking about the concepts you have learned so far. I doubt your professor will want a highly detailed, super-technical answer.

What kind of things can you do to protect security?
What kind of things can you do to get around security?

Duoas 1,025 Postaholic Featured Poster

It doesn't matter. Just use the supplied functions to convert it to/from a string.

(I'm not being rude here. You should not care how it is actually stored in memory --only how to use it. I shouldn't have mentioned its storage type.)

If you want to learn more about floating-point data types see the section "Data types, variables, and constants" chapter in the Object Pascal Reference that came with Delphi.