Embedded Systems Conference
Breaking News
Comments
Newest First | Oldest First | Threaded View
<<   <   Page 3 / 8   >   >>
Max The Magnificent
User Rank
Author
Re: Carriage-return Linefeed
Max The Magnificent   1/16/2014 11:33:18 AM
NO RATINGS
@DrSnake: ...It gets all over.

Whenever I use WD40, it certainly seems to get all over me! :-)

DrSnake
User Rank
Author
Re: Carriage-return Linefeed
DrSnake   1/15/2014 10:32:52 PM
NO RATINGS
One of the recomended uses of WD40. Open the ribbon cartrige and spray the top of the ribbon. It gets all over.

David Ashton
User Rank
Author
Re: Working!
David Ashton   1/14/2014 2:47:39 PM
NO RATINGS
@FlyByPC...I have heard about FreeBASIC and might give it a try sometime.   I used GWBasic here as it was from about the right era for the program.  FreeBASIC says on its website that it is very compatible with QuickBASIC which I worked with a bit.   I'll put FreeBASIC on my ever-growing list of things to do.  I need to win the lotto and retire so I can get time for all the interesting stuff... :-)

FlyByPC
User Rank
Author
Re: Working!
FlyByPC   1/14/2014 2:30:50 PM
NO RATINGS
It's nice that GWBASIC is still available, but you ought to check out FreeBASIC. It can be set to accept old-school GWBASIC syntax, but has a lot more modern capabilities, as well -- arrays of up to 2GB or so, high-resolution graphics in true color, user-defined types, and structured programming (functions, subroutines, etc.) 

I use FreeBASIC with FBIDE: http://fbide.freebasic.net/ 

 

Stargzer
User Rank
Author
Re: PROGRAM
Stargzer   1/13/2014 2:57:32 PM
NO RATINGS

@betajet:  "Thank you for contributing this week's dose of nostalgia."

You're welcome!  When I'm not reading SciFi I'm reading history.

@betajet:  "A Pascal semicolon is a statement separator.  You put it between statements.  Thou shalt never place a semicolon in front of "else".  In contrast, a C semicolon is a statement terminator."

Coming from a PL/I background I probably thought of it as a terminator, thinking of "else" as a separate statement (line).   My brief encounter with Pascal was 30-some-odd years ago. 

I try to write code so I can follow it a later time (somewhat self-documenting), using indenting.  I would write: if (x >= 0) y = x; else y = -x; in two lines as:

if (x >= 0) y = x;
else y = -x;" 

I can see how if you read the Pascal statement from left-to-right it's almost a complete sentence, not broken down into separate steps like above:

if x >= 0 then y:= x else y:= -x

but, "OTOH, in C you can write "y = x >= 0? x: -x;" is great for compact syntax and saving space back when disk space was dear.  But hey, it was written by system programmers looking for something between assembler and a high level language.  I hope to learn it and play with it some day (I like the bit where you can stuff in some assembler or machine code in-line; a hacker's dream (from the original def of hacker). 

 

Max The Magnificent
User Rank
Author
Re: Carriage-return Linefeed
Max The Magnificent   1/13/2014 2:49:59 PM
NO RATINGS
@Stargzer: If it's not returning, I'm not sure what the problem is.

If you type characters you can see them on the paper (very faint because the ribbon is 30 years old -- I iave to pick up a new one when I get round to it) -- but when you hit the return key, the carriage returrns but there's no line feed, which there shoudl be when you are manually typing on the keyboard. 

betajet
User Rank
Author
a? b: c
betajet   1/13/2014 1:59:09 PM
NO RATINGS
The Betajet wrote: in C you can write "y = x >= 0? x: -x;" which much nicer than Pascal.

Flurmy wrote: Yuk! That's exactly what I try to avoid like hell.  As you said, chacun a son goût, but I think I'm in good company.  MISRA and alike strictly forbid mumbo jumbo like this.

Well, I learned LISP before I learned C.  LISP's fundamental conditional operator is COND, which is an extended version of "a? b: c".  LISP is a great language for reasoning about programs, and proving that they work.  (For best results, use equivalent mathematical notations rather than lots of parentheses.)  "a? b: c" is also a great notation for writing multiplexers in Verilog.

I'm puzzled that some people don't like "a? b: c", but I accept that some people would rather write Basic or Fortran :-)

Flurmy
User Rank
Author
Scrap paper
Flurmy   1/13/2014 2:50:51 AM
NO RATINGS
betajet: in C you can write "y = x >= 0? x: -x;" which much nicer than Pascal.

Yuk! That's exactly what I try to avoid like hell.
As you said, chacun a son goût, but I think I'm in good company.
MISRA and alike strictly forbid mumbo jumbo like this.

If their program got into a loop (but not a hard Sys) and printed one character and a page feed continuously, well, there would be a pile of scrap paper.

I worked on a CDC6600 via punched cards and batch processing.
When, hours later, I went to pick up the result of my program I met a friend who told me: "Ha, ha, ha! Someone printed a pile of paper so high full of numbers! Ha, ha, ha!"
Surprise: someone was... me!
I mistakenly swapped the job control cards, putting the "load and run" before the "link" one. obviously the "program" crashed violating the memory fence and I got the dump of the whole memory in octal (each location was 60 bits, i.e. 20 octal digits)...

herbissimus
User Rank
Author
Re: scanner?
herbissimus   1/10/2014 8:56:30 PM
NO RATINGS
one only needs a single led and the array of photodetectors, just spread the light into a plane. the rows of holes passing by do the rest.

sorry, this was already suggested earlier. p.s. i have manuals and tty which has been resting unmaintained since 1977.

betajet
User Rank
Author
Re: PROGRAM
betajet   1/10/2014 7:55:20 PM
NO RATINGS
Thank you for contributing this week's dose of nostalgia.

Dr. Wirth intended Pascal as a language for teaching good programming practices.  I still think it's a terrific first programming language.  OTOH, Modula-2 was intended as a serious programming language.

Teaching a programming language isn't easy, particularly if you haven't mastered it.  Not understanding semicolons in Pascal is pretty lame.  A Pascal semicolon is a statement separator.  You put it between statements.  Thou shalt never place a semicolon in front of "else".  In contrast, a C semicolon is a statement terminator.  It also converts an expression like "x = 3" into a statement like "x = 3;"  Go ahead an put a semicolon in front of "else".  Go ahead and write "if (x >= 0) y = x; else y = -x;"  So what it it's ever so much uglier than "if x >= 0 then y:= x else y:= -x".  OTOH, in C you can write "y = x >= 0? x: -x;" which much nicer than Pascal.

While FORTH is something of a write-only language, it does make a nice intermediate language and is dirt simple.  But APL is the epitome of the write-only language.

<<   <   Page 3 / 8   >   >>


Radio
NEXT UPCOMING BROADCAST
In conjunction with unveiling of EE Times’ Silicon 60 list, journalist & Silicon 60 researcher Peter Clarke hosts a conversation on startups in the electronics industry. One of Silicon Valley's great contributions to the world has been the demonstration of how the application of entrepreneurship and venture capital to electronics and semiconductor hardware can create wealth with developments in semiconductors, displays, design automation, MEMS and across the breadth of hardware developments. But in recent years concerns have been raised that traditional venture capital has turned its back on hardware-related startups in favor of software and Internet applications and services. Panelists from incubators join Peter Clarke in debate.
Most Recent Comments
David Ashton
 
perl_geek
 
BurntSushi
 
palangga
 
BurntSushi
 
dt_hayden
 
NoNIckName_#2
 
pattrsn
 
zeeglen
Flash Poll
Top Comments of the Week
Like Us on Facebook

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
Special Video Section
Chwan-Jye Foo (C.J Foo), product marketing manager for ...
The LT®3752/LT3752-1 are current mode PWM controllers ...
LED lighting is an important feature in today’s and future ...
Active balancing of series connected battery stacks exists ...
After a four-year absence, Infineon returns to Mobile World ...
A laptop’s 65-watt adapter can be made 6 times smaller and ...
An industry network should have device and data security at ...
The LTC2975 is a four-channel PMBus Power System Manager ...
In this video, a new high speed CMOS output comparator ...
The LT8640 is a 42V, 5A synchronous step-down regulator ...
The LTC2000 high-speed DAC has low noise and excellent ...
How do you protect the load and ensure output continues to ...
General-purpose DACs have applications in instrumentation, ...
Linear Technology demonstrates its latest measurement ...
10:29
Demos from Maxim Integrated at Electronica 2014 show ...
Bosch CEO Stefan Finkbeiner shows off latest combo and ...
STMicroelectronics demoed this simple gesture control ...
Keysight shows you what signals lurk in real-time at 510MHz ...
TE Connectivity's clear-plastic, full-size model car shows ...
Why culture makes Linear Tech a winner.