Go to Post Have you been formally diagnosed as a masochist, or are you just a mentor? - GeeTwo [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 31-05-2006, 09:03
gabrielse's Avatar
gabrielse gabrielse is offline
Registered User
FRC #1748 (Lab Rats)
Team Role: Teacher
 
Join Date: Jun 2005
Rookie Year: 2004
Location: Baltimore
Posts: 55
gabrielse is a splendid one to beholdgabrielse is a splendid one to beholdgabrielse is a splendid one to beholdgabrielse is a splendid one to beholdgabrielse is a splendid one to beholdgabrielse is a splendid one to beholdgabrielse is a splendid one to behold
Re: Using printf() as UserCode in EasyC 2.0

Quote:
Originally Posted by tacman1123
I've add stdio.h to the Include files of my project, but printf("Test: %d", 1); (as a UserCode block) isn't writing to the terminal. What does PrintToScreen() do differently? PrintToScreen is limited to a single variable, and has a "\n" at the end, I'd like to have a bit more control (and just understand the communciation process better).

Do I need to include the printf_lib? If so, can someone explain the steps of integrating the VexCode libraries with the EasyC libraries?

TIA,

Tac
I've had good luck using PrintToScreen as user code when I need to print multiple variables on one line. Use PrintToScreen the same way you would use printf in a user code block, just make sure you typecast your variables. There is no need to include any libraries.

example (type this in as user code):
PrintToScreen("x = %d, y = %d\n", (int)x, (int)y);

Good luck.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printf BillyJ Programming 9 21-01-2006 14:03
Kickoff easyC workshop integrated into EasyC help file Dan Larochelle Programming 0 11-01-2006 06:12
Why printf? Mike Programming 5 20-03-2005 15:54
printf isn't printf-ing. Help! Meandmyself Programming 14 15-02-2004 16:27


All times are GMT -5. The time now is 03:37.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi