|
This is a bit of a weird question but what programming languages use :: (double colon) as part of their syntax and for what? Info on any language would be appreciated, particularly if the syntax has different uses. (I've tried searching google but then google doesn't like non-alphanumeric searches) The only ones I know are C++ and PHP, C++ seems to use it for member functions and scope resolution. I don't understand how the compiler knows the difference -- how is that? PHP uses it for public static functions Are member functions the same as public static functions? Update (the following day) sorry, I can't post an explanation yet but I will soon. I know this sounds weird but there's a good reason. I'll post in this thread with an update later (I suppose if you want to be notified send me a PM or an email on what-the-hell-is-the-double-colon-about@holloway.co.nz ) N.Z.'s Champion fucked around with this message at 00:17 on Mar 5, 2008 |
# ¿ Mar 4, 2008 11:08 |
|
|
# ¿ Apr 29, 2024 05:10 |
|
ShoulderDaemon posted:And you have got to explain why you're asking this question. I can now reveal that N.Z.'s Champion posted:This is a bit of a weird question but what programming languages use :: (double colon) as part of their syntax and for what? This was about Microsoft's push for OOXML approval at the ISO and a particularly dumb part of the specification that required implementors to implement Microsoft OLE2 with particular method calls that contained :: (double colon) within them. Within the specification there's Part 4: 3.18.49 ST_OleUpdate (OLE Update Types) which is used by Part 4: 3.3.1.59 oleObject (Embedded Object). This part of OOXML remains as it was in ECMA-376 so you can read the description here on OpenISO.org. It requires implementors to call "IOleObject::Update" or "IOleLink::Update" as method calls (which are the MS Windows OLE method calls) which effectively limits the implementation programming language as :: (double colon) means different things in different languages and may be unusable in some. This made it into a report I wrote for Standards NZ on OOXML so thanks for your help everyone (especially ShoulderDaemon, tef and 6174 ) (Oh and psssst goons... it's me. I'm da Matthew Holloway in the op) N.Z.'s Champion fucked around with this message at 23:03 on Mar 25, 2008 |
# ¿ Mar 25, 2008 22:58 |
|
This is probably a stupid question but lets say that I've got variables A and B... is there a way to swap their values without using a third variable (Eg, C = A, A = B, B = C) and without meddling with pointers? I guess I was just wondering whether there's some syntax for this that I was unaware of, perhaps in a single expression. (in Python, PHP, whatever)
|
# ¿ Aug 25, 2008 22:40 |
|
Ugg boots posted:is this a loving joke? Nope, serious, and I'm sure it's a stupid question (I'm pretty tired). Is there a way of doing it in a single expression?
|
# ¿ Aug 25, 2008 23:06 |
|
Avenging Dentist posted:Dude, someone showed how to do it like 5 posts up. gently caress, sorry folks So unpacking tuples works in Python, but can this be done in PHP?
|
# ¿ Aug 25, 2008 23:15 |
|
Scaevolus posted:Do you guys go to the same school? Heh, I was just looking at a min/max check where the user was giving the values in the wrong order and so I wanted to swap them if A > B. It's a coincidence and I wasn't following this thread. Sorry everyone for the derail. I'm a loving idiot. N.Z.'s Champion fucked around with this message at 23:28 on Aug 25, 2008 |
# ¿ Aug 25, 2008 23:23 |
|
Ugg boots posted:Also, why is everyone afraid of these mysterious "temporary variables"? I guess it just sounds like an easy optimisation that could result in shorter/clearer code. Is it not?
|
# ¿ Aug 26, 2008 00:12 |
|
I'm not a clever illegible hacks kind of programmer, and I'm already well convinced about the value of readable code. The Python unpacking technique seems to be better in almost all ways though. That's the kind of thing I was after, thanks N.Z.'s Champion fucked around with this message at 00:49 on Aug 26, 2008 |
# ¿ Aug 26, 2008 00:45 |
|
This is probably a moronic question but there's someone I know who wants to migrate a REALBASIC project to something more modern (because they're having problems finding developers, libraries, community). Rather than starting from scratch I guess they should modularise their code as a library, perhaps exposing interfaces in COM or .Net? It's just that I can't find any way out of realbasic, or any way to compile to something else. I'm hesitant to recommend a rewrite but what would you suggest?
|
# ¿ Nov 14, 2008 06:38 |
|
I've got a database like this,code:
code:
(this is just a personal spending tracker, it's not an important app, so hacks are welcome)
|
# ¿ Nov 16, 2010 01:01 |
|
Psychorider posted:Should have posted in the SQL thread but here's your answer anyway:
|
# ¿ Nov 16, 2010 03:37 |
|
Is there a library that will let me read a PDF or SVG and let me know the X/Y/width/height coordinates of everything in it? E.g. something that will resolve nested transformation matrices, font sizes and kerning and other font metrics, or any other layout aspects of the format. I guess I'm looking for a PDF renderer with an API where I can query where it's putting things on the page. Does such a thing exist? N.Z.'s Champion fucked around with this message at 02:46 on Dec 1, 2010 |
# ¿ Nov 30, 2010 23:39 |
|
|
# ¿ Apr 29, 2024 05:10 |
|
Nahrix posted:The problem I'm having is that the actual information is brought up with a javascript.ModalPopupOpen function, and I have no idea how to page scrape that data.
|
# ¿ Apr 1, 2011 05:20 |