살짝 느리기는 한데, 그럭저럭 돌아는 가는 듯한 느낌입니다.

 

가벼워 보이는데, 기능에는 좀 제한이 있슴.

http://codepad.org/

 

나름 괜찮다고 봅니다.

http://www.ideone.com/

반응형

#include <iostream.h>
    using namespace std;
   
/* 템플릿으로 만든 값을 비교하는 Max 함수 */
template
T Max(T a, T b)
{
    return a > b? a : b;
}


void main()
{
    int Char1_HP = 300;
    int Char2_HP = 400;
    int MaxCharHP = Max(Char1_HP, Char2_HP);
    cout << "HP 중 가장 큰 값은 " << MaxCharHP << "입니다." << endl; << endl;
   
   
    float Char1_Exp = 250.0f;
    float Char2_Exp = 250.57f;
    float MaxCharExp = Max(Char1_Exp, Char2_Exp);
    cout << "경험치 중 가장 큰 값은" << MaxCharExp << "입니다." << endl << endl:
}

반응형
그래서 소리소 레스토랑에 갔다. 아내는 모닥불을 쬐고 싶다고 해서, 가봤는데 꽤나 마음에 들어하네. 밥먹고 2시간 정도 산책, 눈싸움도 하고 모닥불에 고구마고 구워 먹고 했다. 어찌나 다들 젛아하는지 말이다.







반응형

 

 

초단위 조작만 가능, 타이머 핸들러내에 타이머 재등록 함수를 호출하여 periodic timer를 구현 가능함.
단, 이 경우 등록된 타이머를 취소하는 방법에 유의. 기존에 등록된 타이머가 남아있으면 엑셀이 재 시작된다.

자세한 사용 예제 참조: http://www.cpearson.com/excel/OnTime.aspx
 

Application.OnTime Method

Schedules a procedure to be run at a specified time in the future (either at a specific time of day or after a specific amount of time has passed).

Syntax

expression.OnTime(EarliestTime, Procedure, LatestTime, Schedule)

expression A variable that represents an Application object.

Parameters

Name

Required/Optional

Data Type

Description

EarliestTime

Required

Variant

The time when you want this procedure to be run.

Procedure

Required

String

The name of the procedure to be run.

LatestTime

Optional

Variant

The latest time at which the procedure can be run. For example, if LatestTime is set to EarliestTime + 30 and Microsoft Excel is not in Ready, Copy, Cut, or Find mode at EarliestTime because another procedure is running, Microsoft Excel will wait 30 seconds for the first procedure to complete. If Microsoft Excel is not in Ready mode within 30 seconds, the procedure won’t be run. If this argument is omitted, Microsoft Excel will wait until the procedure can be run.

Schedule

Optional

Variant

True to schedule a new OnTime procedure. False to clear a previously set procedure. The default value is True.

Remarks

Use Now + TimeValue(time) to schedule something to be run when a specific amount of time (counting from now) has elapsed. Use TimeValue(time) to schedule something to be run a specific time.

Example

This example runs my_Procedure 15 seconds from now.

Visual Basic for Applications

Application.OnTime Now + TimeValue("00:00:15"), "my_Procedure"

This example runs my_Procedure at 5 P.M.

Visual Basic for Applications

Application.OnTime TimeValue("17:00:00"), "my_Procedure"

This example cancels the OnTime setting from the previous example.

 

Visual Basic for Applications

Application.OnTime EarliestTime:=TimeValue("17:00:00"), _
    Procedure:="my_Procedure", Schedule:=False

http://ezgoing.tistory.com/227

 

'Set up the next event one second from now
    NextTick = Now + TimeValue("00:00:01")
    Application.OnTime NextTick, "UpdateClock"

 

'Cancel the OnTime event(Stop the clock)
    On Error Resume Next
    Application.OnTime NextTick, "UpdateClock", , False

반응형

MS Excel: CDBL Function (VBA)

In Microsoft Excel, the CDBL function converts a value to a double.

Syntax

The syntax for the CDBL function is:

CDbl( expression )

expression is the value to convert to a double.

Applies To

  • Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

Type of Function

  • VBA function (VBA)

VBA Function Example

The CDBL function can only be used in VBA code. For example:

Dim LDouble As Double

LDouble = CDbl(8.45 * 0.005 * 0.01)

The variable called LDouble would now contain the value of 0.0004225.

반응형

'VBA' 카테고리의 다른 글

Excel VBA 이용해서 워드 파일 생성  (0) 2013.02.08
Application.OnTime 설명  (0) 2012.12.28
벽에 부딪힌 vba  (0) 2012.08.13
How to solve the problem - "Compile Error: Can't find project or library"  (0) 2012.05.21
집중력의 한계  (0) 2012.04.30
대학원 4학기를 마치고, 아이들과 동해안 여행을 다녀왔다. 오랜만의 나들이였다. 학기중에는 아무리 마음 편히 하려고 해도 잘되지 않는다. 좀 빠듯하기는 했지만, 마음에 드는 여행이었다. 밤에 아이들과 조개도 구워먹고 말이지. 봄이 오면 좀더 즐겁게 갈 수 있을 것 같다.









반응형

+ Recent posts