math.round on double

时间:2016-02-16 16:12:31

标签: vb.net double rounding

我为excel文件编写了一个非常简单的例程。这是它

<?php
require 'PHPMailerAutoload.php';

$mail = new PHPMailer;

//$mail->SMTPDebug = 3;                               // Enable verbose debug output

$mail->isSMTP();                                      // Set mailer to use SMTP
$mail->Host = 'smtpserver.com';  // Specify main SMTP server. If you dont have one us GMAL or mandrill
$mail->SMTPAuth = true;                               // Enable SMTP authentication
$mail->Username = 'user@youremail.com';                 // SMTP username
$mail->Password = 'pass';                           // SMTP password
$mail->SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587;                                    // TCP port to connect to

$mail->setFrom('from@youremail.com', 'Mailer');
$mail->addAddress('joe@youremail.net', 'Joe User');     // Add a recipient
$mail->addAddress('ellen@youremail.com');               // Name is optional
$mail->addReplyTo('info@youremail.com', 'Information');
$mail->addCC('cc@youremail.com');
$mail->addBCC('bcc@youremail.com');

$mail->addAttachment('/var/tmp/file.tar.gz');         // Add attachments
$mail->addAttachment('/tmp/image.jpg', 'new.jpg');    // Optional name
$mail->isHTML(true);                                  // Set email format to HTML

$mail->Subject = 'Here is the subject';
$mail->Body    = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

if(!$mail->send()) {
    echo 'Message could not be sent.';
    echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
    echo 'Message has been sent';
}

所有变量都声明为双精度数。我不明白为什么结果是0.如果我删除Math.Round我得到数字

0 个答案:

没有答案