programming-languages

Is C a middle-level language?

In programming language discussions we hear terms such as low-level, middle-level, and high-level. How are these determined? Would C be considered a middle-level language? ...

Parser problem - Else-If and a Function Declaration

A quick, fun question - What is the difference between a function declaration in C/C++ and an else-if statement block from a purely parsing standpoint? void function_name(arguments) { [statement-block] } else if(arguments) { [statement-block] } Looking for the best solution! =) Edit: Thanks for the insight guys. I was actually ...

Programming-General: What are the 5 stages in which a source code is transformed to a executable file?

I receive this question in a test: What are the 5 stages in which a source code is transformed to a executable file? ...

How to get spacing between characters printed using TextOut ?

I'm trying to calcuate size of each cell (containing text like "ff" or "a0"), so that 32 cells will fit into window by width. However, charWidth*2 doesn' represent the width of a cell, since it doesn't take spacing between characters in the account. How can I obtain size of a font so that 32 cells each is two chars like "ff" fit exactly...

Explaining abstraction to a non-programmer.

Abstraction is a concept that seems difficult to explain, without reverting to using programming terminology. I've thought about it a lot, and I can't come up with a satisfactory answer. Does anyone have any very general, yet very pertinent explanations? Metaphors, similes etc are all welcome. ...

What is the process of creating an interpreted language?

I want to create a very simple experimental programming language. What are some resources can i check out to get an overview of the process of creating an interpreted language. I will be using c++ to build and compile the interpreter. ...

Need help programming with Mclauren series and Taylor series!

Ok so here's what i have so far: #include <stdio.h> #include <math.h> //#define PI 3.14159 int factorial(int n){ if(n <= 1) return(1); else return(n * factorial(n-1)); } void McLaurin(float pi){ int factorial(int); float x = 42*pi/180; int i, val=0, sign; for(i=1, sign=-1; i<11; i+=2){ sign *= -1; // alternate...

What do I need to learn to make a website that can make a text file?

I want to make a website, but all I know is basic HTML and CSS. On this website, I want the user to input in multiple text fields (sort of like they take a quiz) and then the program will make a text file based on the user input which the user can download. I want it to work backwards, too, so that the text file is the input. What do ...

Cell phone programming languages

I'm seeking statistics about programming languages for cell phones. Is there any information about how many cell phones have Java, Android, Symbian, Windows Mobile, etc? ...

Does a syntax for this exist? In any language?

It seems pretty common to me to have an argument, in a dynamically typed language that is either an Object or a key to lookup that object. For instance when I'm working with a database I might have a method getMyRelatedStuff(person) All I really need to lookup the related stuff is the id of the person so my method could look like this i...

chomsky hierarchy and programming languages

Hi, I'm trying to learn some aspects of the Chomsky Hierarchy which are related to programming languages, and i still have to read the Dragon Book. I've read that most programming languages can be parsed as a context free grammar (CFG). In term of computational power, it equals the one of a pushdown non deterministic automaton. Am I rig...

Protecting IP for scripting projects

There are some tasks where the obvious language choice is with scripting languages: bash, Python, Ruby, Tcl... however I find it hard to protect a company IP once the product is delivered because the application is never compiled. The client will have complete access to every single line of code. Which one are the choices to protect a p...

Is there an "opposite" to the null coalescing operator? (…in any language?)

null coalescing translates roughly to return x, unless it is null, in which case return y I often need return null if x is null, otherwise return x.y I can use return x == null ? null : x.y; Not bad, but that null in the middle always bothers me -- it seems superfluous. I'd prefer something like return x :: x.y;, where what follows th...

Where can I learn web programming from start to mastery?

I tried doing tutorials but it is unorganized and unstructured, where can I learn PHP from beginner to master? I'm looking for a site like www.w3chools.com, but somehow I feel it is incomplete, specially when it comes to more advanced functions. I know some basics but I wouldn't be able to for example make a secure online webstore, and ...

What are the limitations of assembler? (NASM)

Is there a technical limitation of what kind of programs I can write with assembler (NASM)? For now I've only seem some program that do arithmetic operations, like adding two numbers. Is it possible to write complex assembler programs, that provide a GUI, access the file system, plays sounds et cetera? I know I wouldn't write such pr...

Could I be writing this code better?

Is there any website out there somewhere where a programmer such as myself might be able to post pieces of code to be looked at by more experienced people? I am thinking of something that programmers could use to have advice given on how to improve their ability. I really like the atmosphere here, but am not sure that posting code for ...

Why don't lazy languages support mutation?

I'm studying programming language theory and I can't figure out a solid reason why lazy languages don't have mutation. Anyone know the reason? ...

CSS Brace Styles

I'm unable to figure how the standard (or just popular) brace style names apply to CSS. Here're all the brace styles: /* one - pico? */ selector { property: value; property: value; } /* two - pico extra */ selector { property: value; /* Start Properties on Newline */ property: value; } /* three - horstmann? */ sel...

scripts on Cshell

hello, I've got some problem, I have list of data in the file: 053-37878 03828008 Moskovitch James 500 052-34363 01234567 Mendelson Kippi 450 053-32322 03828008 Jameson Shula 350 054-39238 03333333 Merden Moshe 300 is it possible rewrite this list in the same file (without using temporary file) but without last number thanks in advanc...

execute php via mysql ?

Is it possible to execute a php file using mysql stored procedure or event scheduler? ...