Search Results

Search found 7380 results on 296 pages for 'scripting languages'.

Page 88/296 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • What programming langauge is this

    - by Hutch
    We're trying to script a cad program, and this is the example for controlling the date in our design slugs, but I don't even know what language it is to know what to do with it. ! LIBEDATE def &d$ &ret$ set &d$ = rstr(`/`,` `,#d$); set &ret$ = word(&d$,2),`/`,word(&d$,1),`/`,subs(word(&d$,3), -2, 2)

    Read the article

  • Java - how to tell class of an object?

    - by lkm
    Given a method that accepts as a parameter a certain supertype. Is there any way, within that method, to determine the actual class of the object that was passed to it? I.e. if a subtype of the allowable parameter was actually passed, is there a way to find out which type it is? If this isn't possible can someone explain why not (from a language design perspective)? Thanks Update: just to make sure I was clear void doSomething(MyType myType) { //determine if myType is MyType OR one of its subclasses } Since the method signature specifies the parameter as being MyType, then how can one tell if the object is actually a subtype of MyType (and which one).

    Read the article

  • If-statement with logical OR

    - by exiter2000
    public class Test{ public static void main(String args[]){ int a = 0; int b = 1; int c = 10; if ( a == 0 || b++ == c ){ a = b + c; }else{ b = a + c; } System.out.println("a: " + a + ",b: " + b + ",c: " + c); } } Ok, this is Java code and the output is a: 11,b: 1,c: 10 And I believe the C acts same as Java in this case That is because second condition(b++ == c) would never executed if the first condition is true in 'OR' operator. There is a "NAME" for this. I just don't remember what it is. Does anyone know what this is called?? Thanks in advance

    Read the article

  • Why Aren't Programs Written In Assembly More Often?

    - by mudge
    It seems to be a mainstream opinion that assembly programming takes longer and is more difficult to program in than a higher level language such as C. Therefore it seems to be recommend or assumed that it is better to write in a higher level language for these reasons and for the reason of better portability. Recently I've been writing in x86 assembly and it has dawned on me that perhaps these reasons are not really true, except perhaps portability. Perhaps it is more of a matter of familiarity and knowing how to write assembly well. I also noticed that programming in assembly is quite different than programming in an HLL. Perhaps a good and experienced assembly programmer could write programs just as easily and as quickly as an experienced C programmer writing in C. Perhaps it is because assembly programming is quite different than HLLs, and so requires different thinking, methods and ways, which makes it seem very awkward to program in for the unfamiliar, and so gives it its bad name for writing programs in. If portability isn't an issue, then really, what would C have over a good assembler such as NASM?

    Read the article

  • Are raw C++ pointers first class objects?

    - by Shailesh Kumar
    According to Wikipedia: An object is first-class when it: can be stored in variables and data structures can be passed as a parameter to a subroutine can be returned as the result of a subroutine can be constructed at runtime has intrinsic identity (independent of any given name) Somebody had once told me that raw pointers are not first class objects while smart pointers like std::auto_ptr are. But to me, a raw pointer (to an object or to a function) in C++ does seem to me to satisfy the conditions stated above to qualify as a first class object. Am I missing something?

    Read the article

  • What language/compiler for native running of application in any windows(XP/Vista/7) platform?

    - by Xinxua
    Hi, I want to develop an application that runs on any windows platform (XP, Vista, 7) but does not require a dependency like .NET Framework or JVM. I have given the other requirements below: Runs in any windows platform Must have GUI libraries to create windows/primitive controls I also want the output file size of the application to be minimal (So cannot include .net frameword etc in the exe file) Any suggestions for this requirement?

    Read the article

  • Primary reasons why programming language runtimes use stacks?

    - by manuel aldana
    Many programming language runtime environments use stacks as their primary storage structure (e.g. see JVM bytecode to runtime example). Quickly recalling I see following advantages: Simple structure (pop/push), trivial to implement Most processors are anyway optimized for stack operations, so it is very fast Less problems with memory fragmentation, it is always about moving memory-pointer up and down for allocation and freeing complete blocks of memory by resetting the pointer to the last entry offset. Is the list complete or did I miss something? Are there programming language runtime environments which are not using stacks for storage at all?

    Read the article

  • Why people do not like OOP? [closed]

    - by Gabriel Šcerbák
    I do not understand why people choose C++ over Smalltalk in past and why Java over Python or Ruby. What is it that ties people so much to the procedural programming and makes it so difficult to go "all the way" to object oriented programming? What makes OOP hard? Should not objects be an abstraction which is easier to grasp for people, i.e. a more natural one than procedures? Is education the problem (because people tend to learn procedural programming before object oriented)?

    Read the article

  • heeeeeeeeeeeeeeelp

    - by Yassin
    plz help me i need to make asimple calculator using c for example (1+2-44)/7 but it requiers reverse polish notation which i cant under stand if any one could help me giving me the code i'll be greatfull cause i have an exam after 2 days

    Read the article

  • Property value of a String object in JavaScript

    - by naivists
    As far as I understand, every string is an object in Javascript. Still, it "does not work" as I expect it to be: var a="abc"; //here we get a new string object a.b = 123; //I seem to declare a property "b" of that object alert(a.b); //alerts "undefined" However, if I try to define a string in the "wrong way", everything works as expected var a=new String("abc"); // a.b = 123; alert(a.b); //alerts "123" Why is that so?

    Read the article

  • checking whether 4 points in a plane define a square ??

    - by osabri
    how to check whether 4 points in the plane define a square? what's the function which given a point and a value of the area of a square as input parameters returns four squares(define a corresponding type) with sides parallel to the x axis and y axis this how i start: #include <stdio.h> #include<math.h> struct point{ float x; float y; } typedef struct point POINT; struct square{ struct point p1; struct point p2; struct point p3; struct point p4; } typedef struct square SQUARE; int main() { int point; printf("point coordinate"); printf("\n\n"); printf("enter data\n");

    Read the article

  • Defend PHP; convince me it isn't horrible

    - by Jason L
    I made a tongue-in-cheek comment in another question thread calling PHP a terrible language and it got down-voted like crazy. Apparently there are lots of people here who love PHP. So I'm genuinely curious. What am I missing? What makes PHP a good language? Here are my reasons for disliking it: PHP has inconsistent naming of built-in and library functions. Predictable naming patterns are important in any design. PHP has inconsistent parameter ordering of built-in functions, eg array_map vs. array_filter which is annoying in the simple cases and raises all sorts of unexpected behaviour or worse. The PHP developers constantly deprecate built-in functions and lower-level functionality. A good example is when they deprecated pass-by-reference for functions. This created a nightmare for anyone doing, say, function callbacks. A lack of consideration in redesign. The above deprecation eliminated the ability to, in many cases, provide default keyword values for functions. They fixed this in PHP 5, but they deprecated the pass-by-reference in PHP 4! Poor execution of name spaces (formerly no name spaces at all). Now that name spaces exist, what do we use as the dereference character? Backslash! The character used universally for escaping, even in PHP! Overly-broad implicit type conversion leads to bugs. I have no problem with implicit conversions of, say, float to integer or back again. But PHP (last I checked) will happily attempt to magically convert an array to an integer. Poor recursion performance. Recursion is a fundamentally important tool for writing in any language; it can make complex algorithms far simpler. Poor support is inexcusable. Functions are case insensitive. I have no idea what they were thinking on this one. A programming language is a way to specify behavior to both a computer and a reader of the code without ambiguity. Case insensitivity introduces much ambiguity. PHP encourages (practically requires) a coupling of processing with presentation. Yes, you can write PHP that doesn't do so, but it's actually easier to write code in the incorrect (from a sound design perspective) manner. PHP performance is abysmal without caching. Does anyone sell a commercial caching product for PHP? Oh, look, the designers of PHP do. Worst of all, PHP convinces people that designing web applications is easy. And it does indeed make much of the effort involved much easier. But the fact is, designing a web application that is both secure and efficient is a very difficult task. By convincing so many to take up programming, PHP has taught an entire subgroup of programmers bad habits and bad design. It's given them access to capabilities that they lack the understanding to use safely. This has led to PHP's reputation as being insecure. (However, I will readily admit that PHP is no more or less secure than any other web programming language.) What is it that I'm missing about PHP? I'm seeing an organically-grown, poorly-managed mess of a language that's spawning poor programmers. So convince me otherwise!

    Read the article

  • How to get spacing between characters printed using TextOut ?

    - by life-warrior
    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 into window's client area ? Curier is fixed-width font. RECT rect; ::GetClientRect( hWnd, &rect ); LONG charWidth = (rect.right-rect.left)/BLOCK_SIZE/2-2; int oldMapMode = ::SetMapMode( hdc, MM_TEXT ); HFONT font = CreateFont( charWidth*2, charWidth, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_OUTLINE_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, FF_ROMAN, _T("Courier") ); HGDIOBJ oldFont = ::SelectObject( hdc, font ); for( int i = 0; i < BLOCK_SIZE; ++i ) { CString str; str.Format( _T("%.2x"), (unsigned char)*(g_memAddr+i) ); SIZE size; ::TextOut( hdc, (size.cx+2)*i+1, 1, str, _tcslen((LPCTSTR)str) ); }

    Read the article

  • How do you learn a class hierarchy quickly?

    - by rsteckly
    Hi, Something I don't enjoy about programming is learning a new API. For example, right now I'm trying to learn Windows Identity Foundation. Its frustrating because I'm going to spend the bulk of the time learning how a few classes work and actually only write several lines of code. In .NET, there are so many types that I seem to spend more time hunting around in msdn for a class than writing code. It also interrupts my workflow while I'm working because I have to type a little bit than look something up. Obviously, I don't have to do this for the basic classes. Whenever new things come though there is definitely some looking up to do. Then I often don't reuse that class enough to really review it or bring it into action. I'm wondering if anybody out there has a found a way to memorize (or look up more efficiently) these object model hierarchies?

    Read the article

  • Is Python a beginner language or is it robust?

    - by orokusaki
    I am already working on some software in Python but I'm having one of those days where I step back and reflect just to make sure I'm not spinning my wheels. I know that Twitter launched with RoR because it was fast to build. Then they almost moved into another language in 2008 because of scalability issues. This has caused me to step back and introspect for a moment to make sure I'm heading down the right path. I've read in some tutorials and other places that Python is "a great first language" or a "nice beginner language" as though it's not capable of larger tasks. I look at it as Python can do what Java or ASP can but with about 1/4th of the code, not to mention I don't have to build or compile, etc. I've read that Java runs quite a few times faster than Python which is important of course, but then I read everywhere that hardware keeps getting cheaper and there are projects like Unladen Swallow by Google to make Python faster. Should I be concerned or is this just the remnants of Java developers?

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >