putting numbers behind eachother


 
Thread Tools Search this Thread
Top Forums Programming putting numbers behind eachother
# 8  
Old 09-19-2011
Null terminate the char array and then just printf("%s\n", buf)...and if you dont know howto null terminate a char array readup on the C language first.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Hardware

Putting an old hd in a new computer

What are the steps you need to take when you put an old HD in a new computer? I just did this. Every time it makes it to the windows boot screen then restarts. I have a bunch of old engineering software that is not compatible with the newer versions of windows. I figured this out after I bought... (6 Replies)
Discussion started by: cokedude
6 Replies

2. UNIX for Beginners Questions & Answers

Decimal numbers and letters in the same collums: round numbers

Hi! I found and then adapt the code for my pipeline... awk -F"," -vOFS="," '{printf "%0.2f %0.f\n",$2,$4}' xxx > yyy I add -F"," -vOFS="," (for input and output as csv file) and I change the columns and the number of decimal... It works but I have also some problems... here my columns ... (7 Replies)
Discussion started by: echo manolis
7 Replies

3. Solaris

Guest LDOMS on same subnet cant ping eachother

Hi all, New to this forum. I have just been reading through a historical thread about some issues with IPMP. Some tips from "Peasant" where very useful. Please see below "Just couple of more hints regarding VM. For VDS, use one VDS - one guest LDOM, don't put everything in primary-vds.... (9 Replies)
Discussion started by: selectstar
9 Replies

4. UNIX for Dummies Questions & Answers

Putting $$ before filename

Hello , I am searching a directory for a file and have to assign the filename to a variable . The variable must have form $$filename So my code is echo "'$$filename='`ls -lrt *PreMatch*.csv| head -1 | nawk '{print $9}'`" however $$ is converting to a number . How could I make it $$... (3 Replies)
Discussion started by: Pratik4891
3 Replies

5. Shell Programming and Scripting

Help awk/sed: putting a space after numbers:to separate number and characters.

Hi Experts, How to sepearate the list digit with letters : with a space from where the letters begins, or other words from where the digits ended. file 52087mo(enbatl) 52049mo(enbatl) 52085mo(enbatl) 25051mo(enbatl) The output should be looks like: 52087 mo(enbatl) 52049... (10 Replies)
Discussion started by: rveri
10 Replies

6. UNIX for Dummies Questions & Answers

Print numbers and associated text belonging to an interval of numbers

##### (0 Replies)
Discussion started by: lucasvs
0 Replies

7. Shell Programming and Scripting

the smallest number from 90% of highest numbers from all numbers in file

Hello All, I am having problem to find what is the smallest number from 90% of highest numbers from all numbers in file. I am having file with thousands of lines and hundreds of columns. I am familiar mainly with bash but I am open to whatever suggestion witch will lead to the solutions. If I... (11 Replies)
Discussion started by: Apfik
11 Replies

8. Shell Programming and Scripting

read numbers from file and output which numbers belongs to which range

Howdy experts, We have some ranges of number which belongs to particual group as below. GroupNo StartRange EndRange Group0125 935300 935399 Group2006 935400 935476 937430 937459 Group0324 935477 935549 ... (6 Replies)
Discussion started by: thepurple
6 Replies

9. IP Networking

Link two sockets to eachother

Hi, I'm programming a system in C++ which will send messages from a server to an ip-camera (both are connected to the system). What it does now is take the message from the server-socket and puts it in the camera-socket. The thing is, after that the camera is going to send a video stream... (1 Reply)
Discussion started by: Eckhardt
1 Replies

10. UNIX for Dummies Questions & Answers

Putting pC on network

How do I put a my PC with linux 7.0 on a class B network. Can someone give me info or text that will guide me? (1 Reply)
Discussion started by: Rush
1 Replies
Login or Register to Ask a Question
fixsub(3alleg4) 						  Allegro manual						   fixsub(3alleg4)

NAME
fixsub - Safe function to subtract fixed point numbers clamping underflow. Allegro game programming library. SYNOPSIS
#include <allegro.h> fixed fixsub(fixed x, fixed y); DESCRIPTION
Although fixed point numbers can be subtracted with the normal '-' integer operator, that doesn't provide any protection against overflow. If overflow is a problem, you should use this function instead. It is slower than using integer operators, but if an overflow occurs it will set `errno' and clamp the result, rather than just letting it wrap. Example: fixed result; /* This will put 4965 into `result'. */ result = fixsub(itofix(5000), itofix(35)); /* Sets `errno' and puts -32768 into `result'. */ result = fixsub(itofix(-31000), itofix(3000)); ASSERT(!errno); /* This will fail. */ RETURN VALUE
Returns the clamped result of subtracting `y' from `x', setting `errno' to ERANGE if there was an overflow. SEE ALSO
fixadd(3alleg4), fixmul(3alleg4), fixdiv(3alleg4) Allegro version 4.4.2 fixsub(3alleg4)