String and numeric codes

Discuss all aspects of programming here.

Moderator: The Mod Squad

String and numeric codes

Postby Ryn » Fri Mar 18, 2005 2:56 am

do you guys know any sites where i can find them? its definition and differences. thanks in advance
Ryn
Black Belt 4th Degree
Black Belt 4th Degree
 
Posts: 4390
Joined: Sun Jan 11, 2004 3:29 am
Location: Manila, Philippines

Postby netaces2k » Mon Mar 21, 2005 6:13 am

In many programming languages, Strings, things inside of the "" set. Are represented by a $. For example: TextString$ = "Hello".

As for the numeric codes. ! = Single; # = Double; & = Long; % = Integer. However, not all languages will allow you to express these in a relative way. With some, you may have to DECLARE a type. DECLARE A-F (SUBTYPES) AS INTEGER.

It just depends...
netaces2k
 

Postby atang1 » Tue Mar 22, 2005 1:36 am

Every input by keyboard is assigned as a variable or array(string). So that you can store or retrieve after computation to be presented on screen or printer.

After you understand how to handle the inputs in programming, there is only logic left, or "if, then, or else" logic.
atang1
 

Postby sirams » Tue Mar 22, 2005 6:19 am

It depends on programming language you use. You should find some tutorial for the particular programming language ( I found a place with lots of programming books but I am afraid that place may be illegal, so I cannot give a link; I found it through yahoo).
C++ for example does not have strings type at all; it represents strings as arrays of symbols. Pascal/Delphi has strings type.
sirams
Green Belt
Green Belt
 
Posts: 121
Joined: Fri May 14, 2004 1:03 am

Postby netaces2k » Tue Mar 22, 2005 7:05 am

In COBOL for example, the definition of something is done very differently.

DATA DIVISION.
WORKING-STORAGE SECTION.

01 TYPE-1.
01 TYPE-1-FOR-DISPLAY PIC X(9.9) VALUE ZERO.

This is just an example of how COBOL looks from the source viewpoint.

The ASM, BASIC, C++, FORTRAN and PASCAL are all different. And that's not to mention how the Visual series of things work.
netaces2k
 

Postby atang1 » Sun Apr 03, 2005 1:22 pm

You are talking about programming language and format differences.

We are talking about variables and logic? Which is the software programming skill. Then you select the language as the tool you want to use to program the machine or native language by compilation for the cpu(platform or instruction set).

Now we are going places; when we finish programming, we have a machine language program or a .bin(binary) or .exe(executable) file?
atang1
 

Postby netaces2k » Mon Apr 04, 2005 7:09 am

I don't think the original question was about logic. It was about the TYPE of variables and their assignment to the variables.

While the logic plays a large role in the program execution, ultimately, it is both the job of the logic and the program format to dictate how the program will run.
netaces2k
 


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests